Nestack Agent Care
Industries / Healthcare / CDI query agent

Healthcare AI agent · CDI query

Clinical-Documentation-Integrity Query AI Agent (CDI)

Read the chart after the encounter, surface the indicators that make it ambiguous, and draft a query in the health system's own templates for the treating clinician to answer — or not.

4–6 weeksTypical delivery
Your stackDeployment
Post-encounterClinician-led
Agent CareAfter launch

What this agent does

Drafts the question, never the answer

In
01

The chart is read after the encounter closes, against the facility's configured query triggers and template library.

02

Normalise indicator values, their date and their exact location in the chart across sources.

Reason
03

Identify where documentation is ambiguous, conflicting or silent against a diagnosis the chart may or may not support.

04

Apply the approved query templates and compliant-query rules configured for the facility, never assumed.

05

Bind each cited indicator to its location in the record, and mark what remains clinically undetermined.

Decide
06

Build multiple-choice options as clinically reasonable alternatives, 'clinically undetermined' included.

07

Route every drafted query to the treating clinician who provided care in that encounter, for their answer alone.

Out
08

Retain the indicators cited, their chart location, the draft sent and the clinician's answer against the record.

09

Execute write actions only inside the approval boundaries agreed during implementation.

Product statement

The agent drafts the query; only the treating clinician may answer it, and that answer must reach the permanent record before anything downstream can use it.

Example workflow

One query, chart to clinician

AgentHuman
1Record reviewedEHR chart, closed encounter note, labs and prior query history
2Indicators gatheredLabs, vitals, orders, prior notes and each one's exact location in the chart
3Query draftedDraft query, cited indicators and confidence
4Controls appliedLeading-language checks, template compliance checks, indicator-support checks and confidence threshold
No human action required

Stages 1 to 4 run unaided, and no query reaches a clinician at any of them — the agent is drafting, and the CDI specialist's lane opens at the confidence gate.

5DecisionBranches at the confidence threshold
High confidence

Goes to the CDI specialist to approve.

Low confidence

Adds a second compliance read first.

Specialist approval

The draft is held with its cited indicators, its chart locations and the confidence.

Approve · Edit · Send for compliance review
Approved — released to clinician
6Query routed to clinicianOnly where write access and approval policy allow it
7Outcome evaluatedResponse rate, edit distance, indicator-support accuracy and compliance-audit findings
Specialist edits

Every specialist edit made at approval is counted in the evaluation.

What should not run autonomously

Human approval stays in control

Outside the boundary — human approval required8 items
Naming or implying the diagnosis a query is meant to produce.
Recording an answer on the clinician's behalf.
Sending a query to anyone but the treating provider from that encounter.
Disclosing reimbursement, DRG weight or severity impact in a query.
Automation boundaryAgent acts unaided
Read the chart after the encounter and cite.
Draft the query in the facility's own approved templates.
Build multiple-choice options as reasonable alternatives, undetermined included.
Flag what the record leaves unclear, and hold the draft for the CDI specialist.
Any write happens inside the boundaries agreed at implementation, never ahead of approval.
Resending a query for the same diagnosis without a new indicator.
Setting or enforcing a response deadline with a consequence attached.
Using a yes/no query to originate an undocumented diagnosis.
Assigning a code, or documenting the note during the encounter.

Example output

One query, annotated

Everything the agent drafts is attached to the indicators it was drawn from.

Query output · single encounterIllustrative example
Patient
Drafted query
Query type
Indicator source
Confidence
Clinician status
Respiratory-status indicator review
Sepsis, another documented process or clinically undetermined — based on the charted vitals and labs
Multiple-choice
Nursing flowsheet, day 2
88%
Sent to the treating hospitalist
As receivedTaken from the chart and the locations cited — nothing on this side is interpreted by the agent.
Indicators cited Vital-sign flowsheet Lab result with time Prior query this stay
Why this reads as ambiguousThe options are clinically reasonable alternatives, undetermined included.
ActionApproveEditSend for compliance review
What the score decidesBelow the configured threshold the draft picks up a second compliance read before.

Value

Where AI adds value

The same four claims, placed at the point in the workflow where each one applies.

Where the value landsValue 01 – 04
Every closed encounterFrom the chart and the query history
03Query drafting

Read for ambiguity

Weigh the indicators already charted against the diagnosis they do, and do not, support.

01Approved path

A query may not suggest its answer

An indicator that supports a diagnosis and one that undercuts it move through the same read, not two.

02Human review

Point the specialist at what needs

Indicators with no clear chart location and low-confidence drafts are marked, so the specialist's read starts where ambiguity concentrates.

04Build an evidence trail

The query, the indicators behind it and the physician who answered stay in the record.

Integrations

Typical integrations

Five system groups connect to the same agent. Which of them are in scope is decided in discovery.

EHR and chart systemsEpic · Cerner · MEDITECH
HL7/FHIR chart feeds
CDI and query platforms3M 360 Encompass · Iodine
Optum CDI · nThrive
Coding and DRG systems3M encoder · TruCode
MS-DRG grouper feeds

Agent

Clinical-documentation-integrity query

Reads the chart
Drafts the query
Holds for approval

Query and HIM systemsCDI worklist tools
HIM and audit-trail systems
Observability & evaluationOpenTelemetry · 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 clinician

Each layer contains the next. What escapes all of them is named in the map below.

L6 · Outermost — last line of defenceInward → L1 · closest to the model
L6Rollback / safe modeNarrow drafting back to indicator surfacing when evaluation or production signals degrade.Roll back
L5Version monitoringTrack model, prompt, template and trigger-rule changes.Track
L4TraceabilityRecord the indicators cited, the draft query, the flag and the specialist's decision.Record
L3Specialist approvalHold drafts for a named CDI specialist; it governs release, not whether a query is compliant.Gate
L2Policy guardrailsTest drafts against leading-language and template rules; a failure returns the draft.Restrict
L1Confidence thresholdsRoute low-confidence drafts to a second compliance read before the specialist sees them.Require review
Model coreQuery drafted — cited indicators, options and confidence
L1 – L2Test whether a drafted query may stand
L3Puts the release in a specialist's hands
L4 – L5Keep the query and the indicators behind it
L6Falls back to indicator surfacing when signals degrade

How Nestack evaluates it

Evaluate the query workflow — not only the finished draft.

Coverage runs the whole depth of the workflow, and every layer is cut by slice.

Surface — the query the clinician sees
Depth of coverage ▼
E1Final-output evaluationDid the drafted query cite indicators the chart actually documents?
E2Step-level evaluationDid the agent use the right chart, template rules and trigger configuration?
E3Tool evaluationDid it read the correct chart and route to the correct treating clinician?
E4Confidence calibrationDo low-confidence drafts actually draw more specialist edits?
E5Slice evaluationHow does performance change across specific query types?
E6Business outcomeHow many drafted queries needed a specialist edit or were found non-compliant on audit?
Floor — the outcome the health system answers for

Failure modes

Where each failure originates in the agent

Seven failure modes, placed at the stage in the query workflow each one begins.

Agent lifecycleDirection of processing →
01 · Retrieval1 mode
DQ-03

Superseded value cited

A preliminary lab or vital is queried after a corrected result posts to the chart.

Stage gathersChart notes, labs and the template library
02 · Reasoning2 modes
DQ-04

Leading-query construction

Option order or wording points toward one diagnosis before the query sends.

DQ-06

Indicator interpreted, not quoted

A term such as malnourished replaces the value the guideline requires quoted.

Stage proposesDraft query, cited indicators and confidence
03 · Tool / write2 modes
DQ-02

Response inferred, not entered

A likely answer is treated as documented before the clinician enters one.

DQ-05

Query resent without new indicators

The same diagnosis is queried again after an unfavourable answer, indicators unchanged.

Stage writesOnly where write access and approval policy allow it
04 · Output1 mode
DQ-01

Financial rationale attached

Reimbursement or severity impact is visible in the query or its surrounding screen.

Stage returnsThe query the clinician answers
05 · Change / Version1 mode
DQ-07

Silent trigger-point drift

A coding-guideline or DRG-table update ships without the trigger points recalibrated.

Stage tracksModel, prompt, triggers and templates
Sev-1 · a query sends outside the boundary Sev-2 · a leading query reaches the clinician Sev-3 · indicators degrade, goes to review

Affected slices

One query type can carry the rest

A service line's query-compliance rate can look acceptable while one indicator or query type accounts for most of what a compliance audit would flag. Nestack reports the rate by slice, not only in total.

Slice performance — reported separately, not only in aggregateIllustrative example
SliceFailure rateLift Lift vs. thresholdStatus
Queries raised on a single indicator7.6%3.9× Review
Sepsis and respiratory-failure queries5.5%2.9× Review
Post-discharge retrospective queries3.4%1.8× Watch
Concurrent queries with full indicators1.9%0.8× Normal
Bar: non-compliant-query rate lift vs. the concurrent full-indicator baseline · scale 0–4.0× · tick marks the 2.0× review threshold 2 of 4 slices over threshold

Evidence-linked improvement

The loop closes on the query, not the volume

A cycle is closed when the leading query is a case the next release must survive. That suite is what the next query raised is measured against.

Improvement cycle · five stagesSwitchback — the path turns at Improve and returns at Learn
01Detect

Non-compliant-query rate rises in a service-line slice.

02Diagnose

The query that named the diagnosis it wanted is traced to the template, the trigger rule or the training data that produced it.

03Improve

The change ships against a version, with the queries that exposed it attached.

04Verify

Release is blocked until the affected query cases pass again.

05Learn

The case joins the standing suite and the query templates move with it.

Learn → DetectThe return edge. The next query drafted runs against a suite one case longer.

Typical build scope

Twelve workstreams across six weeks

The build scope read against the delivery timeline. Week structure follows the six-week plan — discovery, sources, query workflow, evaluation, integration, then production validation and handover.

Workstream Week 1Week 2Week 3Week 4Week 5Week 6
01Query-workflow discovery and boundary definition.
02EHR and chart-source assessment.
03Template and trigger-rule mapping and rule mapping.
04Chart ingestion and indicator normalising.
05Indicator retrieval and drafting logic.
06Confidence scoring and flag routing.
07Specialist approval workflow.
08Chart-source and coding-system integration.
09Query-construction cases.
10Guardrails and compliance controls.
11Query-trail instrumentation.
12Deployment, documentation and Agent Care handover.
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 facility, one service line ProductionProduction chart integration AdvancedMultiple facilities / lines
Introduced at Pilot
Query drafting from your chart
Specialist approval
Query-compliance baseline
Introduced at Production
Reporting by service line
Approval workflow in your systems
Approved query write-back
Record-system integration
Introduced at Advanced
Multi-facility query rules
Multi-stage specialist approvals
High query volume
Multi-facility query controls
Build price From $5,000 From $8,000 Custom quote
Final build priceConfirmed after discovery based on integrations, workflow complexity, transaction volume, approval controls and deployment requirements.
Separate from buildBuild 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 bringWe build with it
01Your EHR access, chart sources and query history Chart ingestion and prior-query mappingWeek 1
02Representative charts across query-type cohorts Draft baseline and indicator-citation extractionWeek 2
03Your approved query templates and trigger rules Template and trigger-rule mappingWeek 1
04Access to relevant APIs, feeds or exports Chart-source and coding-system assessment, then integration setupWeek 2
05Queries you would not want sent Leading-query cases and failure-mode testingWeek 4
06What no query may imply Confidence scoring, flag routing, guardrails and approval controlsWeek 3
07Named CDI specialists to approve drafted queries Specialist approval workflow, then pilot and production validationWeeks 5–6
Nothing else is required Deployment, documentation and Agent Care handover are ours.

Delivery timeline

Four phases across six weeks

Each phase sits over the weeks it really occupies, and week 5 carries evaluation alongside the pilot.

Phase W1W2W3W4W5W6
Discovery W1
Build W2 – W3
Evaluate W4 – W5
Pilot & Launch W5 – W6
Week focus W1Query workflow discovery, template mapping and the boundary W2Chart-source integration and the drafting baseline W3Drafting logic, confidence scoring and approval controls W4Evaluation suite, guardrails and failure-mode testing W5Query-system integration, pilot charts and corrections W6One coding cycle queried under the CDI lead, then Agent Care handover
Reading the bandA bar covers the weeks its work is named in, and nothing else. The week 5 overlap is real, not padding.
At the end of W6The last checks clear on live queries and Agent Care picks up monitoring.
DurationSix-week plan shown · typical delivery 4–6 weeks depending on scope confirmed in discovery.

Next step · Healthcare AI agent

Build a CDI-query agent around your compliant-query workflow.

Show us your chart sources, your approved templates and who answers a query. The answer to every query stays with the treating clinician, entered in the record.

Nestack Agents · CDI queryAGT-HC-16 · Agent Care available after launch