AWS Builder Center

Arcane: Cedar-Guarded Patient Follow-Ups

A doctor follow-up platform where an AI agent drafts patient reminders — and Cedar policy, not the prompt, decides what it's allowed to send.

Arcane Architecture

Doctors often track follow-ups from memory or sticky notes. If a follow-up slips, the patient may never get checked on. When they do call back, the doctor has to reconstruct the patient's condition from scratch.

Arcane fixes both problems: a short note after each visit creates a fast, searchable patient history, while follow-ups are scheduled once and notified automatically when they are due.

The Workflow

A doctor sets a follow-up once, such as "check back in 7 days." From there, everything happens automatically.
  1. The doctor records a short note after the visit.
  1. The note becomes searchable immediately.
  1. The doctor schedules the follow-up duration.
  1. A Step Functions wait holds the workflow until the follow-up is due.
  1. The reminder agent reads the relevant notes for context.
  1. Cedar authorizes the agent's tool call.
  1. The patient receives the follow-up reminder.
The next call starts with context instead of relying on memory.


The AWS Stack

Built on the Build It track, using AWS open-source tooling locally with no AWS account required.
The same application code maps directly to real AWS services in production, without requiring a rewrite:
  • LocalStack → DynamoDB and Step Functions
  • AWS SAM CLI → Lambda and API Gateway
  • Cedar → authorization policies
  • Strands Agents SDK → reminder agent
  • Ollama → local model
  • OpenSearch → patient note search
  • Finch → local container runtime
For production, the local components can be replaced with:
  • DynamoDB
  • AWS Lambda + API Gateway
  • AWS Step Functions
  • Amazon OpenSearch Service
  • Amazon Bedrock
Cedar remains the same.


Why Cedar, Not Just a Prompt

Patient notes are sensitive. A doctor should only be able to access their own patients.
Arcane enforces that rule with a Cedar policy on every request instead of relying on application-level  if  checks that could be forgotten when a new endpoint is added.
The same authorization model also limits what the reminder agent can do.
The agent is built with the Strands Agents SDK, and every tool call is checked by Cedar before execution.
The agent can:
  • Read a patient's notes
  • Send a follow-up reminder
The agent cannot:
  • Access another doctor's patients
  • Modify patient records
  • Send arbitrary messages
  • Call tools outside its allowed scope
These restrictions are tested directly without running an LLM. Calling the agent's tool functions in-process triggers the same Cedar authorization check used during a live agent conversation.

That makes the guardrails enforceable by policy, testable in isolation, and independent of the model's behavior.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article