Inspiration

A single vial of CAR-T cell therapy is worth $500,000 for one specific patient. When a freezer fails mid-transit at −80 °C, a Qualified Person spends four hours manually writing an ICH E6(R2) §4.5 protocol-deviation packet — while the dose warms. The GxP world already has excellent sensors and excellent dashboards. What it does not have is the autonomous decision-and-paperwork layer between them.

We wanted to prove that a rigorously scoped multi-agent workflow could compress those four hours into under sixty seconds, without violating a single 21 CFR Part 11 clause and without letting the LLM anywhere near the regulatory arithmetic.

What it does

CryoMesh is an autonomous cold-chain custodian for ultra-low-temperature biopharma shipments. Four Google ADK agents on Gemini 3.5 Flash Lite run a linear workflow:

  1. Triage — debounce sensor noise, confirm a real excursion
  2. Thermal Decay Evaluator — deterministic USP <1150> Arrhenius mean-kinetic-temperature physics (in pure Python — the LLM never does math)
  3. Logistics Dispatch — book a UN1845-compliant dry-ice courier through a sandbox gateway
  4. Compliance & Audit — draft an ICH E6(R2) §4.5 deviation packet with CAPA fields, integrity-hash chain, and a ReportLab-rendered PDF

Every state change routes through an un-bypassable 21 CFR Part 11 §11.70 Human-In-The-Loop QP sign-off gate. Gemma — our second Google AI model — narrates the audit stream in plain English.

How we built it

  • Google ADK Workflow — parked-interrupt primitive enforces HITL gates
  • Gemini 3.5 Flash Lite — reasoning + tool calls (location=global, Vertex AI Agent Platform)
  • Gemma — plain-English narration of the audit stream
  • Deterministic Python physics — Arrhenius MKT calculator, sublimation runway estimator, all property-tested with Hypothesis
  • FastAPI — async API layer with 11 domain routes
  • Cloud SQL Postgres — ADK session service
  • Google Cloud Storage — signed-URL PDF artifact service
  • Cloud Pub/Sub — excursion ingest topic
  • Next.js + React + Tailwind + Leaflet + Recharts — real-time dashboard
  • ReportLab — deviation-packet PDF with ICH E6(R2) §4.5 + USP <1150> citations
  • Docker multi-stage build — Next.js frontend + Python backend in one container
  • Google Cloud Run — deployed, live, publicly reachable
  • 311 tests — pytest + Hypothesis property-based tests + PDF byte-identity regression + grep-guard against un-authorized state=FILED writes

Challenges we ran into

  • Vertex AI Model Garden ≠ API accessibility. Several Gemini 3.5+ endpoints appear in Model Garden yet return 404 on generateContent for our project. Landed on gemini-3.5-flash-lite at location=global after a curl-based capability probe.
  • Cloud Run CPU throttling killed async ADK background tasks silently. No exception, no log line — just zero packets. Fixed with --no-cpu-throttling --min-instances=1. This was the hardest bug of the build.
  • Pydantic tuple[float, float] tripped Vertex AI Schema. Fixed by switching to list[float] in models that cross the ADK tool-call boundary.
  • Un-bypassable Part 11 gate enforcement. Solved with a grep-guard CI test: only cryomesh/security/transitions.py may assign state = FILED. Any other file doing so fails CI.
  • Prompt-injection defense on QP comment path — free-text field is validated + hashed before it ever reaches an LLM prompt.

Accomplishments we're proud of

  • 311 tests passing including property-based Hypothesis generators on the physics module and byte-identity regression on the PDF renderer
  • One and only one file in the codebase can flip a packet to FILED — grep-guarded and CI-enforced
  • Second Google AI model (Gemma) integrated for the hackathon bonus
  • Deployed to Cloud Run live at a public URL — no synthetic-mode fallback, real Gemini calls, real Postgres sessions
  • Real ICH E6(R2) §4.5 PDF artifacts with a UN1845 dry-ice waybill on every rescue booking

What we learned

  • Vertex AI Model Garden listings are not API-availability guarantees — always probe with a curl before wiring
  • Cloud Run's request-scoped CPU allocation is the silent killer of asyncio.create_task orchestrators
  • ADK's park-and-resume interrupt primitive is the cleanest way to model an un-bypassable HITL gate — it forbids the workflow from advancing without a signed disposition
  • Never let the LLM do regulatory arithmetic — every MKT number in every packet must be reproducible from raw ticks by pure Python

What's next for CryoMesh

  • Real UN1845 courier gateway integration (currently a compliant sandbox)
  • FDA eNDA/eSUB submission bookmarking so filed packets stream directly into the regulatory dossier
  • Multi-shipment fleet orchestration with cross-shipment learning
  • Extend the "autonomous custodian" pattern to blood banking, cell therapy, and gene therapy cold chains

Built With

Share this project:

Updates

Submission history