Skip to content

AI Agents WorkshopΒΆ

What You'll Learn

In this hands-on workshop, you'll build an AI agent that helps doctors manage their patient portal inbox β€” and learn why doing it naively is dangerous. Across four labs, you'll add observability, reliability, and security to a working agent, grounded in real healthcare constraints.

Workshop FlowΒΆ

  1. Prerequisites β€” Clone the repo, install dependencies, start the EHR inbox
  2. Slides β€” AI Development Lifecycle + Opportunities, Risks & Mitigation
  3. Lab 1: The Naive Agent β€” Build a naive doctor inbox agent and see where it breaks
  4. Lab 2: Observability β€” Instrument and trace your agent
  5. Lab 3: Improving Your Agent β€” Add a critic agent and Granite Guardian
  6. Lab 4: Securing Data Used By The Agent β€” Harden with Postgres RLS and least-privilege access
Time Estimate

The workshop runs for 2 hours: ~30 minutes of presentation followed by four ~20-minute labs.


The ProblemΒΆ

Doctors are overwhelmed with patient portal messages. A single message might contain several unrelated questions β€” some urgent, most routine. Responding to all of them comes on top of a full patient load.

Can we use an AI agent to help? And can we do it responsibly β€” keeping the doctor in the loop, protecting patient data, and avoiding the temptation to let the AI "just handle it"?


Workshop StructureΒΆ

Lab 1: The Naive AgentΒΆ

Build a background agent that reads patient records and portal messages, identifies concerns, and surfaces them in the inbox UI. No guardrails, no access controls β€” intentionally problematic.

Lab 2: ObservabilityΒΆ

The naive agent is a black box. Add tracing and structured logging so you can see every decision it makes and inspect its reasoning.

Lab 3: Improving Your AgentΒΆ

Use observability data to identify failure modes. Add a critic agent to evaluate the primary agent's output, and Granite Guardian for groundedness detection.

Lab 4: Securing Data Used By The AgentΒΆ

Move from "trust the code" to database-enforced access control with Postgres Row-Level Security. Map the threat model, apply least-privilege, and test against adversarial inputs.


Additional ResourcesΒΆ

Let's get started! Head to Prerequisites to set up your environment.