Inspiration
Manufacturing quality incidents rarely begin with one clean, complete dataset. A team may receive a supplier notice, batch-production records, warehouse inventory, shipment exports, laboratory results, and customer complaints—all in different formats and with important information missing. During the first minutes of an incident, the hardest question is not simply, “What went wrong?” It is: Which products must be contained immediately, which relationships remain uncertain, and what evidence supports every decision?
Holding too little can expose customers to risk. Holding everything can stop production, disrupt supply chains, and create unnecessary waste. We built TraceGuard to help quality teams find the smallest defensible containment boundary quickly, without allowing an AI model to invent traceability facts or execute high-impact actions by itself.
What it does
TraceGuard is an evidence-grounded quality-containment agent for manufacturing incidents. A quality professional can upload PDFs, CSV files, JSON, Markdown, and text records. TraceGuard then:
- Reads and organizes the incident evidence.
- Uses Gemini to extract source-supported identifiers and relationships.
- Reconstructs the product journey from supplier material to production batches, inventory, shipments, and customers.
- Separates items into affected, uncertain, and clear categories.
- Identifies missing evidence that could change the containment boundary.
- Proposes actions such as inventory holds, shipment stops, investigations, and releases.
- Requires an authorized human to approve or reject operational actions.
- Produces an auditable assessment, timeline, and execution receipts. TraceGuard is more than a conversational assessment tool. It maintains case state, runs analysis asynchronously, prepares controlled actions, and records what happened. Its included Sandbox WMS demonstrates action execution without connecting the hackathon project to a real production system. ## How we built it How we built it We designed TraceGuard as a hybrid agentic system: Gemini handles unstructured evidence interpretation, while deterministic software controls safety-critical classification and action execution. The application uses:
- Gemini 3.5 Flash Lite to interpret messy incident documents and produce evidence-grounded explanations.
- Google Agent Development Kit (ADK) to orchestrate the agent, sessions, tools, and multi-step investigation workflow.
- Cloud Run to host the FastAPI backend and web-based quality incident workspace.
- Cloud Tasks to run durable asynchronous agent jobs with controlled retry behavior.
- Firestore Native Mode to persist cases, evidence, agent jobs, product-lineage data, decisions, audit events, and action receipts.
- Secret Manager to provide credentials at runtime without storing them in the repository.
- Artifact Registry and Cloud Build to build and manage the application container.
- Terraform to document and reproduce the Google Cloud infrastructure. The workflow follows a strict evidence boundary. Gemini can interpret uploaded documents and call typed tools, but it cannot independently decide that an unsupported lot, shipment, customer, or relationship exists. Extracted identifiers must appear in the evidence, and uncertain relationships remain explicitly uncertain. After extraction, a deterministic containment engine propagates status through the product genealogy. Proposed actions are separated from executed actions, and every approved operation receives an idempotency key and execution receipt. ## Challenges we ran into One major challenge was preventing a capable language model from filling gaps with plausible manufacturing assumptions. In quality containment, a convincing but unsupported relationship can be more dangerous than an incomplete answer. We addressed this through strict prompts, typed tool contracts, source-bound identifiers, deterministic propagation rules, and explicit uncertainty states. Another challenge was making long-running analysis reliable in a serverless environment. A synchronous request could time out or leave the interface without useful feedback. We introduced persisted background jobs, Cloud Tasks delivery, retry limits, job polling, structured error codes, and visible run states. Cloud configuration also required careful debugging. We worked through API authentication, Gemini quota and billing configuration, service-account permissions, Secret Manager access, Firestore persistence, Cloud Run startup configuration, and differences between a safe local demonstration and the complete Gemini-backed deployment. Finally, operational actions created an important design question: how could we demonstrate real agent behavior without pretending the hackathon system was connected to a certified production ERP or warehouse platform? We built a stateful Sandbox WMS and an idempotent connector contract. This lets TraceGuard execute approved demonstration actions and produce receipts while keeping real-world integration claims honest. ## Accomplishments that we're proud of We are proud that TraceGuard combines useful AI autonomy with clear operational boundaries. Rather than producing only a narrative response, TraceGuard creates a structured product journey, calculates a defensible containment boundary, identifies uncertainty, proposes concrete actions, and preserves an audit trail. We are especially proud of:
- The separation between AI interpretation and deterministic safety decisions.
- Evidence-level traceability for extracted identifiers and relationships.
- Human authorization before high-impact operations.
- Idempotent action execution and verifiable receipts.
- Durable agent jobs and persisted case state on Google Cloud.
- An industry-oriented interface designed for quality professionals rather than a generic chatbot.
- A complete reference incident demonstrating supplier, production, inventory, shipment, customer, and follow-up evidence. ## What we learned We learned that trustworthy industrial AI is not achieved through prompting alone. It requires system-level controls around the model. The most valuable architecture pattern was assigning each component a clear responsibility: Gemini interprets evidence, deterministic code calculates containment status, Google Cloud provides durable execution and persistence, and the human remains accountable for consequential actions. We also learned that uncertainty must be represented as a first-class result. A strong quality system should not hide missing information or force every product into a binary affected/clear decision. Sometimes the most useful result is a precise explanation of what is unknown and which single document or test would resolve it. Finally, we learned that agent observability is part of the user experience. Persisted jobs, progress stages, error classification, audit events, and downloadable reports are essential when users need to trust both the result and the process that produced it. ## What's next for TraceGuard Our next step is to evolve TraceGuard from a hackathon-ready decision-support system into a production-validation candidate. Planned improvements include:
- Organization-backed authentication and role-based access control.
- Isolated workspaces for plants, suppliers, and incident teams.
- Validated connectors for ERP, WMS, laboratory, QMS, and logistics platforms.
- Notification workflows with approved templates and escalation policies.
- Evidence malware scanning, retention controls, and regulatory data governance.
- Confidence and citation views for every extracted relationship.
- Additional evaluation datasets covering recalls, packaging defects, contamination, temperature excursions, and supplier deviations.
- Human-feedback evaluation and regression testing for extraction quality.
- Monitoring, load testing, disaster recovery, and connector reconciliation.
- Support for controlled follow-up investigations and evidence-driven release recommendations. Our long-term vision is for TraceGuard to become a trusted incident-response partner: fast enough for the first minutes of a quality event, rigorous enough to show its evidence, and disciplined enough to know which decisions still belong to people.
Built With
- agentic-ai
- artifact-registry
- async-processing
- cloud-build
- cloud-run
- cloud-tasks
- docker
- fastapi
- firestore
- gemini
- gemini-api
- google-adk
- google-cloud
- google-cloud-iam
- manufacturing
- opentelemetry
- python
- quality-assurance
- rest-api
- secret-manager
- supply-chain
- terraform
- traceability
Log in or sign up for Devpost to join the conversation.