Inspiration

A protocol amendment can look like one sentence on paper. At a research site, that sentence can become a missed courier, an impossible blood draw, conflicting instructions, or a participant waiting while teams try to determine which version applies.

My background sits at the intersection of pharmaceutics and software engineering, and I wanted to close the gap between understanding a protocol change and knowing whether it can actually be implemented safely.

A 2024 Tufts CSDD study of 950 protocols and 2,188 amendments found that investigative sites operated under different protocol versions for an average of 215 days. That number became the name of the project: Protocol 215.
Getz et al., Therapeutic Innovation & Regulatory Science, 2024; PMID: 38438658.

What it does

Protocol 215 is Clinical Amendment Preflight. It treats a protocol amendment like a software release that should be rehearsed before deployment.

A study team uploads the original and amended protocols. Gemini converts both PDFs into structured, page-linked study information. Deterministic code then identifies the meaningful changes, traces their downstream dependencies, and rehearses the amendment against a synthetic Trial Twin of each site and participant.

In the demo, an amendment adds a blood sample six hours after dosing. At Phoenix, AZ, the sample falls at 6:00 p.m.—after the courier leaves at 5:30—and the site has no validated overnight storage. Neither PDF contains that conflict. Protocol 215 discovers it by combining the amendment with operational reality.

The agent automatically completes safe administrative work, pauses participant-sensitive actions for human approval, and never permits prohibited clinical decisions. It finishes by generating an evidence-linked Amendment Release Manifest.

How we built it

Protocol 215 is an asynchronous Google Cloud workflow:

  • Gemini 3.5 Flash through Vertex AI structures the protocol PDFs with page-level evidence.
  • Google ADK orchestrates the multi-step workflow, human-approval pause, and resume.
  • Cloud Run hosts the public application and a separate private worker.
  • Cloud Storage preserves the source protocols.
  • Pub/Sub carries the start and resume events.
  • Firestore stores the Trial Twin, workflow state, actions, approvals, and audit history.
  • Deterministic Python performs the semantic diff, dependency mapping, rehearsal, authorization, invariants, and idempotent tool execution.

All protocols, sites, participants, and trial systems are completely synthetic.

Challenges we ran into

The hardest challenge was making the system truly agentic without allowing the model to control its own authority.

Gemini can understand ambiguous clinical documents, but it cannot approve its own actions. A deterministic policy layer classifies every proposed action as GREEN, AMBER, or RED. GREEN actions may execute, AMBER actions require a human, and RED clinical decisions are structurally non-executable.

We also had to make asynchronous Cloud Run execution, duplicate Pub/Sub delivery, persistent ADK state, approval resumption, and evidence-linked PDF extraction work as one traceable workflow.

Accomplishments that we're proud of

Protocol 215 now completes a real end-to-end Google Cloud execution: two PDFs are stored, Gemini structures them, five semantic changes are identified, the Trial Twin detects site- and participant-specific conflicts, safe actions execute, the workflow pauses for approval, the same saved process resumes, and the final manifest verifies the result.

I am especially proud that the most important finding—the Phoenix courier conflict—is not hardcoded into either protocol. It emerges from rehearsing the amendment against the site’s operational state.

What we learned

The most dependable agent is not one that uses an LLM for everything.

Gemini understands. ADK orchestrates. Deterministic code controls authority. Google Cloud executes and preserves the evidence.

I also learned that human approval is not a failure of autonomy. In a high-consequence workflow, knowing when to stop is part of intelligent action.

What's next for Protocol 215

The next step is to expand the Trial Twin to additional synthetic protocol types, site capabilities, consent transitions, laboratory workflows, and industry-standard structured study definitions.

Protocol 215 is not intended to replace clinical judgment. The goal is to give clinical teams a safe rehearsal space—so operational contradictions can be discovered before they become instructions for a real participant.

Built With

  • adk
  • agentic-ai
  • ai
  • ai-agents
  • api
  • cloud
  • cloud-firestore
  • cloud-pub
  • cloud-pub/sub
  • cloud-run
  • cloud-storage
  • cloud-sub
  • fastapi
  • firestore
  • gemini
  • gemini-3.5-flash
  • google
  • google-cloud
  • python
  • storage
  • vertex
Share this project:

Updates

Submission history