Portfolio / Featured / AI / LLM · Systems / Cloud
Food-Bank Recall Closure Agent
Turns a food-recall notice into a verified internal closure across a food bank and its partner pantries, with Gemini extraction and a Google ADK coordinator held to typed tools.
Problem
Recall discovery is not recall completion: affected donated stock hides in inconsistent records across partner pantries, and every hold, review and acknowledgement has to be tracked to closure.
What the repository shows
- Deterministic matching before AI: only a normalized UPC and lot match creates an exact match and a reversible quarantine hold; partial or visual matches go to human review.
- A Google ADK coordinator may call only eight allowlisted read or proposal tools; the model cannot change status, authorize disposal or claim regulator closure.
- Pydantic-validated Gemini extraction from PDF, JSON or text notices, with mock, replay and live modes labelled in the interface.
- Idempotent incident, match and task identifiers survive Pub/Sub redelivery: replaying a notice creates no duplicate holds or tasks.
- Administrator-only evidence packs with a SHA-256 per file and an ordered audit hash chain.
Python 3.12 · FastAPI · Google ADK · Gemini · Firestore · Cloud Storage · Pub/Sub · Cloud Run
Evidence for this project2 sources
- Repository documentedRepository documentation
In the Food-Bank Recall Closure Agent, Gemini and a Google ADK coordinator may extract and propose, but the model cannot change status, authorize disposal or claim regulator closure.
The model cannot write arbitrary status, authorize disposal, publish a safety alert, or claim regulator closure.
- Internal coordination only; all fixture products, organizations and images are synthetic.
README.md (opens in a new tab) @ 6bdf032 · reviewed 2026-10-26 · In the ledger
- Repository documentedInspected source code
The agent's matching policy creates an exact match, with automatic quarantine, only when both the normalized UPC and the lot code match; one matching identifier goes to human review.
if upc_exact and lot_exact:
app/domain/matching_policy.py (opens in a new tab) @ 6bdf032 · reviewed 2026-10-26 · In the ledger
How it works
- Validate and store the recall notice with its provenance.
- Gemini converts the untrusted notice into a strict schema.
- Deterministic rules classify inventory and create holds, reviews and partner tasks.
- The ADK coordinator reads sanitized incident context and proposes next steps through allowlisted tools.
- People resolve potential matches, and partner pantries acknowledge.
- The internal workflow closes only when every blocker is empty.
Engineering evidence
- Tests
- 92 test definitions in 27 files, plus a scripted golden path
- CI
- GitHub Actions
- Deployment
- One Cloud Run service with Firestore, Cloud Storage, Secret Manager and authenticated Pub/Sub push with a dead-letter topic (documented script)
- Licence
- MIT
Counted from the repository at commit 6bdf032; the tests were not run for this site.
Limitations
- Internal coordination only: it does not replace official recall notices or decide whether food is safe.
- All fixture products, organizations and package images are synthetic.
- openFDA data is used as supporting enforcement data, not as a real-time alert feed.