Healthcare AI agent · Patient messaging
Patient-Message Reply-Drafting AI Agent (EHR In-Basket)
Read the incoming portal message, retrieve the chart context, classify it and draft a reply into the in-basket — with urgent wording escalated ahead of the queue and a clinician sending every reply.
- Typical delivery
- 4–6 weeks
- Deployment
- Your stack
- Message send
- Clinician only
- After launch
- Agent Care
What this agent does
Drafts the reply, never sends it
In
- 01
Take the incoming portal message as the patient wrote it — their own words, their own language, their own urgency.
- 02
Retrieve only the chart context the reply depends on — last visit, active medications, recent results and orders.
Reason
- 03
Sort the message into the client's own categories — clinical, refill, results — and route it to the pool that owns it.
- 04
Draft from what the record and the client's approved answer library support, at the reading level their policy sets.
- 05
Read a refill request against the last visit and the monitoring the drug requires, and say what the protocol needs.
Decide
- 06
Match the message against the client's red-flag wording and surface it ahead of the queue, without assigning acuity.
- 07
Hold back anything that would interpret a result, change a treatment or answer what the record does not cover.
Out
- 08
Place the draft in the in-basket beside the message and the chart context it used, with gaps marked — unsent.
- 09
Retain the message, the sources read, the draft, every edit made before sending and who sent it.
Product statement
The agent drafts into the in-basket. A clinician or the pool that owns the message reads, edits and sends — nothing is sent automatically, ever.
Example workflow
One message, end to end
- 1Message receivedFrom the portal in the patient's own words and language, into the in-basket or pool it was addressed to
- 2Red-flag screenThe client's own red-flag wording is checked before a draft exists; a hit leaves the queue and goes to a person
- 3Context retrievedLast visit, active medications, recent results, pending orders and the care plan — for that patient and that encounter
- 4Reply draftedWritten from what the record and the client's approved answers support, with everything they do not cover marked
No human action required
Stages 1 to 4 run without a person in the loop — screening, retrieval and drafting finish before anyone opens the message. Nothing leaves the in-basket in that stretch, and a red-flag hit breaks out of it at once.
Reaches the in-basket as a clean draft.
Reaches a person marked, ahead of the queue.
Clinician review
The draft is held beside the message and the chart context it used, with the unanswered parts marked and no send action available to the agent.
Edit · Send · Reassign or discard
Sent — handed back
- 6Sent by a personOnly when a person presses send; the agent has no send action, and any disclosure wording goes with the reply
- 7Outcome evaluatedUrgent messages caught, unsafe drafts, editing before sending, wrong-context retrieval and subgroup results
Sent unchanged
Replies sent with no edit are counted as a risk signal.
What should not run autonomously
Human approval stays in control
Outside the boundary — human approval required
8 items
- Sending any reply to a patient.
- Interpreting a result the clinician has not reviewed.
- Approving, issuing or renewing a prescription.
- Changing a dose, a drug or a treatment plan.
Automation boundary
Agent acts unaided
- ✓Screen every incoming message against the client's own red-flag wording.
- ✓Retrieve the chart context the reply depends on, for that patient and encounter.
- ✓Classify the message and route it to the pool that owns it.
- ✓Draft a reply the record supports and mark what it does not answer.
Write actions run only inside the approval boundaries agreed during implementation. Send is not one of them.
- Deciding that an urgent message can wait its turn.
- Closing a message without a person reading it.
- Deciding that a message is a billable encounter.
- Changing red-flag wording, routing pools or answer libraries.
Example output
One portal message, annotated
Everything the agent drafts is attached to the message and the chart context it came from.
Draft output · single in-basket message
Illustrative example- Message
- Refill request, portal
- Written in
- Spanish, out of hours
- Red flags
- None found
- Draft placed in
- Refill pool, unsent
- Chart support
- 88%
- Refill decision
- Held for the prescriber
As received
The message as the patient wrote it, in the language they wrote it in, and the red-flag screen that ran before any draft.
Evidence used
- Last visit and dose
- Monitoring on file
- Client refill protocol
Why nothing is sent
The agent has no send action. A refill is a prescribing decision; the draft states what the protocol needs.
What the score decides
Chart support decides how much of the draft is marked unanswered, not whether a reply is safe to send.
Action
EditSendReassign or discardValue
Where AI adds value
The same four claims, placed at the point in the workflow where each one applies.
Where the value lands
Value 01 – 04
Every incoming message
From the portal, into the in-basket
Apply the client's own answers
Use the approved phrasing, refill protocols, results-release rules and the chart already on file.
Take the assembly out of the in-basket
The routine reply arrives written, with the chart context already gathered — the same messages as before, not more of them.
Get the urgent message seen sooner
Wording on the client's red-flag list goes to a person ahead of the queue instead of waiting its turn behind routine traffic.
Build an evidence trail
Retain the message, the chart context read, the draft, every edit made before sending and the person who sent it — on both paths.
Integrations
Typical integrations
Five system groups connect to the same agent. Which of them are in scope is decided in discovery.
In-basket & portal
- Epic In Basket
- MyChart
- Oracle Health
- MEDITECH
- patient portal
Chart context
- Problem list
- medications
- allergies
- Last visit and notes
- care plan
Results & orders
- Lab and imaging results
- release rules
- Refill protocols
- e-prescribing
Agent
Patient-message reply drafting
- Screens and classifies
- Drafts the reply
- Holds for sending
Routing & language
- Message pools
- coverage rules
- Translation
- communication preferences
Observability & evaluation
- OpenTelemetry
- Langfuse
- Supported monitoring/evaluation sources
Integration availability depends on the client's existing systems and API access.
Agent controls
Six layers between the model and the send button
Each control wraps the one inside it. A draft clears every layer before it appears in the in-basket, and the send action sits outside all six.
L6 · Outermost — last line of defence
Inward → L1 · closest to the model
- L1 – L2
- Decide whether a draft may be written at all
- L3
- Decides which chart the draft may read
- L4 – L5
- Keep send with a person and the trail intact
- L6
- Pulls automation back when signals degrade
How Nestack evaluates it
Evaluate what reaches the patient — not only how the draft reads.
Coverage runs the whole depth of the workflow, and every layer is cut by slice. The suite is built first around the messages that must never be drafted as routine.
Surface — the draft waiting in the in-basket
- E1Final-output evaluationWas the reply correct, and did the record support it?
- E2Urgent-message recallHow many red-flag messages were drafted as routine?
- E3Tool evaluationDid it read the correct patient, encounter and result?
- E4Unsafe-draft rateHow often would the draft have caused harm if sent unchanged?
- E5Slice evaluationHow does draft quality change across specific message cohorts?
- E6Business outcomeHow much was edited before sending, and how much went out unread?
Floor — the reply the patient actually receives
Failure modes
Where each failure originates in the agent
Seven failure modes plotted against the five stages of the agent lifecycle.
Agent lifecycle
Direction of processing →
01 · Intake / sorting
1 mode
- PM-01
Urgent read as routine
A red-flag message is drafted and queued like any other.
Stage sorts
The message, its language and the pool it belongs to
02 · Retrieval
2 modes
- PM-02
Wrong patient or encounter
Context is taken from another chart or an older visit.
- PM-03
Refill without the check
Drafted past the last visit or the monitoring the drug needs.
Stage gathers
The patient, the encounter and the results read
03 · Drafting
2 modes
- PM-04
Result answered too early
A result no clinician has interpreted is explained to the patient.
- PM-05
Advice nobody gave
A warm, confident draft states a plan the clinician has not decided.
Stage writes
The reply text and the wording the draft proposes
04 · Review / send
1 mode
- PM-06
Sent on a glance
A fluent draft is sent unread, with its errors intact.
Stage returns
The draft a person reads, edits and sends
05 · Change / Version
1 mode
- PM-07
Silent routing regression
A rule or model change moves what reaches which pool.
Stage tracks
Model, prompt, red-flag list and routing changes
- Sev-1 · unsafe content reaches the patient
- Sev-2 · the draft misleads the sender
- Sev-3 · the message waits or lands wrong
Affected slices
Draft quality is lowest where the stakes are highest
Aggregate reply quality can look acceptable while a small number of message cohorts carry most of the wrong context, most of the unsafe drafts and most of the replies that go out with a glance. Nestack reports performance by slice, not only in total.
Slice performance — reported separately, not only in aggregate
Illustrative example| Slice | Failure rate | Lift | Lift vs. threshold | Status |
|---|---|---|---|---|
| Non-English and translated messages | 5.4% | 3.4× | Review | |
| Symptom messages with red flags | 4.3% | 2.7× | Review | |
| Low health-literacy messages | 3.1% | 1.9× | Watch | |
| Routine administrative requests | 1.0% | 0.6× | Normal |
Bar: lift vs. all-message baseline · scale 0–4.0× · tick marks the 2.0× review threshold
2 of 4 slices over threshold
Evidence-linked improvement
A rise in replies sent unedited opens a ticket, not a case study
Send-without-edit is read here as a risk signal. When it climbs, the cohort is pulled and the drafts are read back against the messages behind them.
Improvement cycle · five stages
Switchback — the path turns at Improve and returns at Learn
- 01
Detect
Urgent recall, unsafe drafts or replies sent unedited move in a cohort.
- 02
Diagnose
Traced to the sorting, the retrieval, the answer library or the routing.
- 03
Improve
The red-flag list, prompt or protocol rule is changed, re-approved and version-linked.
- 04
Verify
Re-run against held-out messages from the affected cohort, including the ones that failed.
- 05
Learn
That message becomes a regression case and the changed rule enters the in-basket runbook.
Learn → Detect
The return edge. A red-flag or routing change decides which patient waits — it is signed off before it ships, not after.
Typical build scope
Twelve workstreams across six weeks
The build scope read against the delivery timeline. Week structure follows the six-week plan — discovery, retrieval and drafting, evaluation, integration, then production validation and handover.
Workstream
Week 1Week 2Week 3Week 4Week 5Week 6
- 01Workflow discovery and automation-boundary definition.Week 1
- 02In-basket, portal and pool routing assessment.Week 1, Week 2
- 03Red-flag wording and escalation paths.Week 1, Week 2
- 04Message taxonomy and answer library.Week 2
- 05Chart-context retrieval and encounter binding.Week 2, Week 3
- 06Refill-protocol and results-release rules.Week 3
- 07Draft generation in the client's phrasing.Week 3, Week 4
- 08Disclosure wording and send-time attestation.Week 4
- 09Urgent-recall and unsafe-draft evaluation suite.Week 4, Week 5
- 10Language and health-literacy testing.Week 5
- 11In-basket integration and send workflow.Week 5, Week 6
- 12Observability, deployment and Agent Care handover.Week 6
12 workstreams · 6 weeks · bar shows the weeks a workstream is active — several run in parallel
Final scope and sequence confirmed in discovery
Engagement tiers
What each tier includes
Rows are the capabilities named in each tier's scope. Higher tiers include everything below them.
| Capability✓ in scope · — not at this tier | PilotOne clinic, one message pool | ProductionProduction in-basket integration | AdvancedMulti-specialty / multi-pool |
|---|---|---|---|
| Introduced at Pilot | |||
| Drafted replies into the in-basket | ✓ | ✓ | ✓ |
| Red-flag screening and escalation | ✓ | ✓ | ✓ |
| A person edits and sends every reply | ✓ | ✓ | ✓ |
| Baseline draft-quality evaluation | ✓ | ✓ | ✓ |
| Introduced at Production | |||
| Answer library, phrasing and reading level | — | ✓ | ✓ |
| Chart-context retrieval and binding | — | ✓ | ✓ |
| Message classification and pool routing | — | ✓ | ✓ |
| Drafts held to refill and results rules | — | ✓ | ✓ |
| Observability and subgroup evaluation | — | ✓ | ✓ |
| Introduced at Advanced | |||
| Multi-language and translation workflows | — | — | ✓ |
| Multi-specialty and enterprise controls | — | — | ✓ |
| Build price | From $5,000 | From $8,000 | Custom quote |
- Final build price
- Confirmed after discovery based on message volume and pools, in-basket and portal integration, the answer library, red-flag and routing rules, translation requirements, approval controls and deployment.
- Separate from build
- Build pricing is separate from recurring Agent Care, which covers managed monitoring, evaluations, incidents and verified improvements after launch.
What we need from you
What you bring, and what we build with it
Each input maps to a piece of build scope and a week in the delivery timeline.
You bring
We build with it
01Your in-basket pools, routing rules and cover arrangements
→In-basket, portal and pool routing assessment
Week 102The wording you already treat as a red flag
→Red-flag wording and escalation paths
Week 103Your standard answers, refill protocols and results-release rules
→Message taxonomy, answer-library and protocol mapping
Week 204Access to in-basket, chart, results and refill APIs
→Epic In Basket, MyChart, results and refill integration
Week 205Messages that went wrong, including the ones that got sent
→Urgent-recall and unsafe-draft evaluation suite
Week 406The languages and reading levels your patients write in
→Language and health-literacy testing
Week 507Named clinicians and pool staff who will edit and send
→Send workflow, then supervised drafting and production validation
Weeks 5–6
Nothing else is required
Deployment, documentation and Agent Care handover are ours.
Delivery timeline
Four phases across six weeks
Phases are drawn over the weeks they actually occupy. Week 5 carries both the language and literacy slices and the first replies a person sends.
Phase
W1
W2
W3
W4
W5
W6
- DiscoveryW1
- BuildW2 – W3
- EvaluateW4 – W5
- Pilot & LaunchW5 – W6
Week focus
W1In-basket pools, red-flag wording, and what may never be drafted
W2Answer library, message taxonomy and API assessment
W3Chart-context retrieval, refill and results rules, first drafts
W4Urgent-recall and unsafe-draft suite, disclosure and attestation
W5Language and literacy slices, in-basket integration, first replies sent
W6Pool staff and clinicians send live replies, then handover
- Reading the band
- Nothing is drafted before week 3, because the red-flag wording has to be agreed first. The bars show that order, not an even spread of effort.
- At the end of W6
- Replies have been edited and sent by the clinicians and pool staff who own the in-basket, then Agent Care takes over monitoring.
- Duration
- Six-week plan shown · typical delivery 4–6 weeks depending on scope confirmed in discovery.
Next step · Healthcare AI agent
Build an in-basket agent around the reply your clinicians send.
Show us your in-basket pools, the wording you already treat as a red flag, and how a portal message gets answered today. We'll score a week of drafts against the replies your staff actually sent.
- Typical delivery
- 4–6 weeks
- Deployment
- Your EHR and in-basket stack
- Message send
- Clinician, always
- After launch
- Agent Care available
Nestack Agents · Patient-message reply drafting
AGT-HC-08 · Agent Care available after launch
