Lab 05

Agentic AI on AWS

Physical twin of the lab graph

What
The same intake → policy → script → safety → decide → review → act graph, drawn as AWS boxes: Ingress, Intake, Knowledge, Script, Safety, Choice, Human task, Final, Egress.
Why
The live lab uses fictional in-memory tools. This page is the production-scale picture of those jobs.
What you are seeing
The region picture shows Browser → Edge → named lab states → egress. Stage boxes below are the same twin grouped as the live Flow column.

Teaching map only. This playground still calls Ollama on localhost — no AWS keys, no real EHR or pharmacy APIs, no prompts leave the machine.

Back to the lab

Region picture

Browser to edge, then named lab steps inside a region, then metrics and egress.

  • Edge
  • Orchestrate
  • Model
  • Storage
  • Search
  • Policy

Browser

Edge

CloudFront
WAF
API Gateway

Region

Agentic AI physical architecture on AWS

Step Functions

Named states, same order as the lab

intake
Lambda
WAF
retrieve_policy
S3
Bedrock KB
OpenSearch
check_script
Lambda
Step Functions
safety
Lambda
Guardrails
decide
Step Functions
Lambda
review
Step Functions
ElastiCache
Bedrock
act
Bedrock
Guardrails
API Gateway
CloudWatch

metrics only

ElastiCache

TTL session

CloudFront

Browser

egress

Stage boxes

The same twin, grouped the way the live Flow column lights.

The front door for a refill request. In production this is a patient app or a pharmacy callback, never a model on the public internet. This lab is a localhost POST.

Parse channel (patient vs pharmacy) and match teaching identifiers. Cheap rules first. Do not log the raw request body.

Fetch the teaching refill policy, not a live chart. On AWS the corpus lives in S3; Bedrock Knowledge Bases owns chunking and query.

A deterministic lookup: refills remaining, last fill, expired. Not an LLM. In production this is an EHR or eRx read.

Controlled-substance, early-refill, and overdue-lab flags. Rules first. Guardrails can add a second policy pass.

Write a path label from the tool results: auto-approve, controlled, renewal, early-or-labs, or identity. The model does not pick the gate.

Zero-touch skips this gate. Identity refuses to the front desk. Controlled, renewal, and labs wait for Approve or Deny. State lives in a TTL cache, not a patient archive.

Submit a fictional PMS order, or say denied / refused. Filter the outgoing note. Do not persist the answer.

Hand the outcome back. Drop the run. Keep operational numbers only.