01What the SDK is
A TypeScript SDK for building clinical AI agents on the Kartha platform — deployed in your own cloud on AWS, GCP, or Azure. You describe an agent in a YAML file and its clinical workflow in a Markdown skill; the SDK runs the loop, and every single tool call passes through the guardrail layer before it touches the EMR. PHI never reaches Kartha or anyone else outside your inference path.
- Safe clinical access, built inPer-user signed tokens from your own KMS, patient-scope on every search, temporal bounds on every date range. Your browser never holds a credential.
- Agents as content, not codeAn agent is a YAML file; a clinical skill is a Markdown document, injected as context — never executed. Changing clinical behavior is a document review, not a code review.
- Your models, your choiceAWS Bedrock, Google Vertex, Azure AI Foundry, or the Anthropic API — wired at deploy time, billed at your rates, in your account.
- Every answer shows its workStreaming responses carry the full tool trace, guardrail badges, token meter, and cost — receipts a clinician and a security team can both read.
One declarative format, two runtimes: the same agent runs on Anthropic's hosted Claude Managed Agents or on Kartha's self-hosted, PHI-clean runtime. No lock-in, either direction. The packages are on npm under @kartha-health, Apache 2.0.
02The accelerators — a running start
You don't start from an empty repo. The SDK ships with ten working clinical agents and a catalog of fifty expert-reviewed skills — medication reconciliation, sepsis screening, cardiovascular risk, discharge planning, coding & CDI, prior-auth packets, and more. Customize by editing the Markdown, not the engine.
- Interactive agentsChat with a patient's chart — the agent retrieves, the guardrails correct every call, results land as typed cards: scores, factor tables, trends, checklists.
- Batch chart abstractionPoint a rubric at a set of notes and get back structured, quote-verified records — every extracted value traced verbatim to its source note.
- Cohort workflowsFan any read-only skill across a whole patient panel as durable, throttled jobs in your AWS account — with an honest roll-up report at the end.
- Try it with zero credentialsForty synthetic patients and an offline demo ship in the box. One command boots the whole stack locally — no EMR, no cloud account, no API key.
Clinical guidance is regional, so skills support guideline-set packs — the same skill can answer with USPSTF, NICE, or IAP/ICMR editions depending on the deployment.
03The skills — evidence-based, agent-agnostic
Every agent and every workflow in the SDK runs on the same clinical skill catalog: fifty expert-reviewed workflow guides, written as Markdown and grounded in the guidelines clinicians already practice by — USPSTF, ADA, ACC/AHA, CDC, KDIGO, ACOG and other society guidelines, using the named instruments a reviewer expects to see. They are agent-agnostic: the same skill drives an interactive session, a headless batch run, or a whole-cohort workflow.
A skill is a document, not a program — injected as context, never executed as code — so clinical review of the file is the whole review, and authoring a new one takes an afternoon, not a sprint. Guideline-set region packs swap editions per deployment (USPSTF ↔ NICE ↔ IAP/ICMR) without touching the skill. The core catalog is open source in LangCare on GitHub.
04Workflows — clinical AI across a whole cohort
Interactive agents work one patient at a time. Kartha Clinical AI Workflows take the same skills across an entire panel — headless, in batch, in your AWS account. Pick a skill, declare the cohort, submit: the platform fans it out as durable, throttled jobs and rolls the results into a report you can stand behind.
How a workflow runs: the worker is the same guardrailed SDK loop — no new engine, just fan-out. Five AWS resources, one CDK deploy, a kill switch, and a queue-less local runner.
- A workflow is one YAML fileCohort, skill, prompt, limits — declarative and reviewed. The cohort is resolved by code, never chosen by a model; an oversized cohort fails at submit, it is never silently truncated.
- Nothing new to trustThe worker is the same guardrailed SDK runtime running headlessly — no new loop, no new guardrails, no new skill format. Batch adds eight invariants of its own, each with an acceptance test, and relaxes none of the ten.
- Built for hospital operationsRead-only by rule — writes-capable agents are rejected at submit. Runs are idempotent and write-once; queue messages and logs carry ids only, so result content never leaves your S3.
- A starter library in the boxHEDIS-style measure gaps, preventive-care gaps, Beers polypharmacy review, drug-interaction sweeps, cardiovascular-risk screening, diabetes panel review, renal monitoring, ICD-10 coding audits — copy one, adjust the cohort, run.
Prototype the whole thing offline — workflow run --local validates the definition and runs it against forty synthetic patients with zero AWS and zero credentials. The same YAML then submits to your deployed stack.
05See it work
Three real sessions, end to end. All data shown is synthetic — fixture patients from the SDK's offline demo. No PHI.

The Clinical Agent Console — the SDK's reference app. A decision-support agent runs the cardiovascular-risk skill; the answer streams with the tool trace, guardrail badges, token meter, and typed result cards.
Physicians are the new clinical-AI developers. This one used Claude Code to run a full, source-cited cardiovascular workup straight from the EMR. The Kartha Clinical Context Platform made it possible — we build the harness, you build the medicine.

Claude Code as the front end: one prompt, sixteen guardrailed Kartha calls into the EMR, and a cited ASCVD assessment where every input traces to its FHIR source.
And payers can run prior auth — both sides of it — in one Claude Code session. The chart comes straight from your EMR, or any FHIR server, through Kartha over MCP. We asked Claude Code to prepare a prior-auth packet for a planned knee replacement, then run the payer-side review on its own output:
- 01 / The provider sideThe prior-auth-packet skill (Kartha SDK) pulled the chart through Kartha — 18 guardrailed FHIR + notes calls, full retrieval trace in the session — and assembled the evidence packet with citations and a prioritized gap list.
- 02 / The payer sideAnthropic's Prior Auth Review sample skill (Claude for Healthcare) then re-reviewed it using the NPI Registry, ICD-10, and CMS Coverage connectors. Verdict: medical necessity 5/5 MET — pended only on admin items (missing NPI, member ID, CPT).
Two skills, built independently by two different teams, converged on the same conclusion. That's what grounded, source-cited agents look like.

The provider side: the prior-auth-packet skill assembles the evidence packet from the chart — administrative checklist, indication, and the step-therapy story, each line cited back to a FHIR resource or note.

The same packet, deeper — objective evidence, the pain trajectory over the full conservative course, and a prioritized list of gaps to resolve before submission.

The payer side: the AI-assisted review runs against the packet — provider and code validation through registry connectors, five of five medical-necessity criteria met, and exactly what's needed to clear the pend.
06Build on it
The fastest way in is the design-partner program: we stand the platform up in your cloud, and your first agent runs on the accelerators within days. If you'd rather kick the tires first, the offline demo needs nothing but Node. Email me or book 30 minutes →