CareLoop AI · UST Claude POC review · Team CareLoop AI
SS · 26.10.07 · 01 / 06
HEALTHCARE · AGENTIC CARE PLANS · MCP

Close the loop on every doctor’s note.

A note becomes typed care cards, the care nobody ordered gets flagged, blocked patients surface themselves, and AI agents act on the same records over MCP.
Live demo · FastAPI · Postgres · Gemini · React 19
→ swipe / arrow keys · P presenter · ESC overview
02 / 06 · POC overview
SIX CELLS · S04
What it is

The note is the plan.

01
The problem

Actionable lines sit inside prose. Ordering the MRI, starting the statin, chasing the referral — all of it lives in someone’s memory.

02
What it does

One pasted note becomes typed cards in Postgres — medication, test, referral, next_visit, general_task — with due dates read out of the note.

03
At-risk patients

Cards carry dependencies. A card turns at_risk while its blocker is open, and heals itself the moment the blocker closes.

04
Care gaps

A 28-diagnosis checklist asks the model which expected care items this note’s cards miss, and offers them to the doctor to approve or dismiss.

05
Agent surface

An MCP server exposes six careloop_* tools over REST, so any agent can read, flag and close the same cards a clinician sees.

06
What is mocked

No EHR or FHIR feed (notes are pasted), one shared demo password, no per-user MCP tokens, and triage results are not shown in the UI yet.

03 / 06 · How it works
FIVE STEPS · ONE HUMAN
From paste to closure

Five steps. One human check.

01 · PASTE Doctor pastes the note Up to 12,000 characters, saved in the same transaction as its cards.
02 · EXTRACT Agent writes typed cards save_card once per item; close_card stores the phrase that proves it was done.
03 · RISK Dependents turn at_risk Risk propagates through the dependency graph and clears when the blocker closes.
04 · GAPS Care gaps are offered A coverage check flags missing items; the doctor approves or dismisses each one.
05 · ACT Agents close the loop MCP clients read, flag and close the same cards — and must supply evidence.
Local router classifies patient-message urgency — no model call, no network
CareLoop AI architecture: React app and Vite proxy, FastAPI API, note agent, Gemini, Postgres, MCP server with six careloop tools, and the UrgencyWatcher triage sidecar
04 / 06 · Architecture
S22 · SOURCED TO CODE
Four
subsystems
The React app talks only to Vite, which proxies /api/* to FastAPI. The note agent is the only writer of cards, Gemini is the only model, Postgres holds the state, the MCP server is a pure REST client with no database credentials, and UrgencyWatcher files triage results into its own schema. Open the interactive version: the same diagram, clickable, in the project docs.
Components
14

Every node carries the file and line that proves it

MCP tools
6

list_patients, list_cards, get_card, close_card, flag_card_risk, list_notes

Direct DB access
0

Agents act through the API, never through the database

05 / 06 · Evidence
MEASURED ON THE DEMO · 07.10.26
Not a benchmark

What the running demo proves.

Notes processed 24 Real notes through the agent, end to end
Cards saved 63 Typed, due-dated, listed in the UI
Recommendations 21 Care gaps a doctor approved or dismissed
Messages triaged 98 26 urgent, 72 not urgent, none lost
Closed with evidence 9 Cards closed only when the note confirmed it
MCP test suite 5/ 5 Close-card flow, risk flags, tool plumbing
Every number above is a row you can query in the demo database — and one dependent card is sitting at_risk because its blocker is genuinely open.
pytest mcp · 5 passed · 0 failed
06 / 06
CLOSING
QUESTIONS FOR ANTHROPIC

Close the loop.
Then keep it closed.

The demo closes cards, flags risk and answers over MCP. What we do not know yet is how much of that a model should be allowed to do alone.
Team CareLoop AI
26.10.07
Three questions
SHAPE · PERMISSIONS · AUDIT
  • Q1

    One agent, or an extractor plus a model?

    Today a single tool-calling agent decides what is actionable and writes every card. Would you keep that, or hand extraction to deterministic code and use the model only for judgement and phrasing?

  • Q2

    May an agent close a clinical card?

    Our MCP tools can close and flag cards. What is the safest permission shape for a clinical server — scoped tools, an approval step, or human-only closure?

  • Q3

    How would you make care-gap reasoning auditable?

    Which features would you reach for — citations back to the note, structured outputs, or an eval harness on the checklist?

→ 完 · END OF FIELD NOTE