Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments that we're proud of

What we learned

What's next for CareFlow AI

Inspiration CareFlow AI started with a question: Can an AI assistant help clinicians move from chart review to insurance paperwork while keeping every answer traceable and every consequential action under human control? The challenge extends beyond summarizing text. Records can conflict, documents can be missing, and an apparently complete form can still contain unsupported information. We wanted to build a workflow where citations, validation, and explicit approval are part of the experience from the beginning. What it does CareFlow AI is a clinician workspace that connects chart review with insurance paperwork preparation. Using synthetic patient records, it can:

  • Explain medication changes across encounters with clickable source citations.
  • Retrieve signed clinical notes and check required documentation.
  • Identify missing information and explain why a workflow was blocked.
  • Prepare an insurance draft through browser automation and verify all eleven form fields.
  • Require approval of the exact draft revision before completing a simulated submission.
  • Preserve conversations, workflow history, and receipts after execution resources are deleted. Patient conversations remain separate, and recalled history is checked against the current chart before it informs a response. How we built it We built the application with Python, FastAPI, and a browser interface, using SurrealDB to persist synthetic charts, conversations, drafts, approvals, and workflow history. Model calls run through Nicrron inside isolated Daytona sandboxes. SurrealDB Agent Memory stores and recalls patient-scoped workflow history, while server-side checks verify its provenance and relevance. For paperwork, Anchor Browser opens a restricted mock payer portal, fills the form, and reads the values back. Approval binds the patient, chart context, draft revision, and complete payload hash. Submission then runs in a fresh execution environment and rechecks that approved state. We integrated PRISM by Block Convey to trace model calls, validation, memory, browser actions, and cleanup across the workflow. Challenges we faced The hardest challenge was making a distributed agent workflow reliable across model responses, database persistence, remote browsers, and temporary execution environments. Model output needed strict validation against source facts and permitted actions. Provider differences also required careful handling of structured responses and tool selection. Browser execution introduced timeouts, interrupted jobs, and resource cleanup. We added explicit recovery and durable submission handling so repeated requests return the same simulated receipt. One subtle issue appeared only during browser review: database auto-typing truncated some saved medication prose. We fixed text persistence with JSON string envelopes, added a real database round-trip check, and replayed affected inputs. What we learned We learned that a successful model response is only one part of a successful workflow. The answer must survive storage, remain tied to the correct patient, cite valid evidence, and respect approval boundaries. Observability also became a development tool. Across 50 genuine baseline executions, we recorded 47 completed chats and three deliberately injected tool-intent failures. A controlled fix successfully replayed all three failures with the same inputs and injected fault. The project’s documented verification includes 92 passing automated tests, live browser checks, and provider cleanup audits. What’s next CareFlow AI currently runs as a local demonstration with synthetic data and a mock payer portal. Future work includes production authentication, real EHR and payer integrations, deployment, and voice interaction.

Built With

Share this project:

Updates

Submission history