-
-
Operations Cockpit: Live 3-panel UI tracking reefer excursion (-6.2°F), Alarm 18, and 8-node LangGraph timeline via SSE.
-
Node 06 Actuation: Under 4s autonomous reroute to Lincoln Cold Hub, dock reservation, and SMS confirmation via state invariants.
-
P0 Escalation Alert: Crimson banner halting autonomous reroute, locking monotonic-OR safety latch, and alerting human dispatch.
-
Gemini 3.5 Flash Review: Citation-grounded risk audit at temp=0.0 evaluating driver checklist evidence against FSMA rules.
-
CALL-E Telephony Ledger: Production portal showing Call ID 23db45..., 1m 24s duration, audio waveform, and driver transcript.
-
Automated Test Suite: 88/88 passing regression tests in 5.20s across 12 suites, validating 8-node graph and safety invariants.
-
Cold Chain Sentinel: 2.5-min live demo showcasing CALL-E autonomous voice triage, Gemini 3.5 Flash, and LangGraph rerouting.
-
Cold Chain Sentinel Banner: Autonomous real-time voice triage engine for cold-chain excursions powered by CALL-E & LangGraph.
Inspiration
In commercial refrigerated logistics, a single mechanical failure—such as Reefer Compressor Alarm 18 (High Engine Temp)—can spike trailer internal temperatures from a -20.0°F frozen setpoint to -6.2°F while hauling $180,000 of temperature-sensitive biologics and vaccines. Fleet dispatchers face a critical 25-minute allowable excursion window before catastrophic cargo spoilage occurs.
Traditional fleet management systems fail during this window:
- Standard telematics alerts sit unread in crowded email inboxes for 15 to 45 minutes.
- Fatigued dispatchers play chaotic phone tag with drivers, misquoting alarm diagnostic codes.
- Rerouting drivers without verifying their Electronic Logging Device (ELD) status risks an FMCSA 49 CFR Part 395 civil penalty of up to $16,000 per violation.
- FDA Food Safety Modernization Act (FSMA 21 CFR Part 1, Subpart O) mandates tamper-proof, timestamped temperature-control audit trails that email threads cannot provide.
We built Cold Chain Sentinel to replace passive telemetry dashboards with an active, autonomous voice triage engine. By fusing the CALL-E telephony API with an 8-node deterministic LangGraph state machine and Google Gemini 3.5 Flash, Sentinel directly calls commercial drivers on the highway within 4 seconds of a thermal spike, audits the situation, and safely actuates an emergency warehouse reroute.
What It Does
Cold Chain Sentinel acts as an autonomous tier-1 dispatch specialist for cold-chain fleet operations:
- Sub-4-Second Autonomous Ingress: Intercepts IoT telematics excursion webhooks, validates E.164 phone formats, and enriches load manifests with TMS bills of lading and ELD Hours of Service (HOS) in parallel.
- Autonomous In-Cab Driver Interrogation: Dispatches an automated phone call via CALL-E directly to the driver's cab. Using a structured IVR checklist, it verifies physical alarms (Alarm 18, compressor head pressure, evaporator airflow) and confirms remaining legal drive time.
- Grounded Cognitive Compliance (Gemini 3.5 Flash): Ingests the verbal triage transcript at
temperature=0.0, strictly structured via Pydantic V2 schemas (ComplianceReviewDecision). Every risk score cites explicit state evidence (e.g., cargo sweating, bulkhead blockage), backed by dynamic fallback to Gemini Pro and prompt-injection defense (OWASP LLM01). - Deterministic Fleet Actuation: If all safety gates pass, Sentinel executes three atomic actuation legs in under 4 seconds: mutating the fleet GPS route to the nearest cold hub (e.g., Lincoln Cold Logistics Hub), reserving an emergency dock bay, and sending an SMS dispatch confirmation to the driver.
- Fail-Safe P0 Human Escalation: If international cellular drops (SIP 408), VoIP timeouts, driver refusals, or unverified diagnostics occur, Sentinel deterministically halts autonomous actuation, locks a mathematical
monotonic-orsafety latch, and alerts human dispatchers with a high-contrast P0 emergency docket. - Task-First Operations Cockpit: A Next.js 16 dark glassmorphism dashboard streaming 9 typed Server-Sent Events (SSE) in real-time, rendering generative timeline cards and telemetry gauges.
How We Built It
Cold Chain Sentinel is architected with a strict dual-track submission boundary:
1. The Core 8-Node LangGraph State Machine (src/agents/)
We implemented an acyclic LangGraph StateGraph that enforces strict separation of concerns across 8 sequential nodes:
ingress ➔ enrichment ➔ call_interrogation ➔ compliance_review ➔ decision_gate ➔ [autonomous_actuation | escalation_failure] ➔ persistence_audit.
Crucially, cognitive reasoning nodes hold zero fleet tool bindings (OWASP LLM06 Excessive Agency prevention). Routing decisions are pure Python conditional edges, never non-deterministic LLM recommendations.
2. State Safety Invariants & Pure Reducers (src/state/reducers.py)
All state is managed via SentinelState with custom pure reducer channels:
monotonic-orReducer: Governsrequires_immediate_human_override. Once any node, telephony failure, or safety gate flips this flag toTrue, it is mathematically impossible for any subsequent tool, node, or LLM to reset it toFalse.immutable-after-init: Protects entry telematics and cargo manifests from tampering.merge-by-key&append-only: Ensures concurrent tool artifacts and regulatory audit events never clobber each other.
3. Telephony Integration & Resilience (src/tools/call_e_client.py)
We integrated the CALL-E SDK using client.calls.create_and_wait wrapped inside asyncio.to_thread for non-blocking FastAPI async execution. We engineered:
- Zero-Redial Telephony Invariant: A strict pre-call guard checking
call_id is None. If a call drops or fails, Sentinel immediately routes to human escalation rather than looping, conserving live credits and preventing driver harassment. - Dynamic Telecom Sanitization: E.164 phone validation, schema normalization (stripping
$defsand unsupported unions), and dynamic regional routing (INfor+91,USdefault).
4. Operations Cockpit Frontend (frontend/)
Built with Next.js 16, React 19, and Tailwind CSS v4, consuming an SSE endpoint (/sessions/{event_id}/stream) with 9 typed event models. Features real-time generative UI cards: EnrichmentSummaryCard, InterrogationResultCard, RiskAssessmentCard, ActuationTransactionCard, and EscalationAlertBanner.
5. Air-Gapped CALL-E Agent Skill (skills/cold-chain-reefer-triage/)
In addition to the orchestrator, we authored a self-contained, zero-framework, dependency-free agent skill (triage.py + SKILL.md) designed for direct upstream PR integration into CALLE-AI/awesome-phone-call-agents.
Challenges We Ran Into
- International Telecom Carrier Drops (SIP 408): When dispatching live calls from our development environment to Indian phone numbers (
+91), local telecom anti-spoofing ILD firewalls dropped unregistered automated VoIP packets withSIP 408 / NO ANSWER. Instead of treating this as a blocker, we turned it into an enterprise feature: we built a deterministic timeout catcher that triggers an automated, fail-safe P0 Human Escalation, and validated the happy path using CALL-E's official US test hotline (+1 276-322-9632). - Preventing LLM Hallucinations in Safety Decisions: LLMs should never have direct execution authority over physical trucks. We eliminated hallucinations by stripping all tool bindings from Gemini 3.5 Flash and restricting its role to structured citation extraction (
ComplianceReviewDecision). Actuation tools are only reachable after our deterministic Pythondecision_gateevaluates six strict criteria (FMCSA HOS limits, cargo sweating, telephony completion, driver refusal, injection checks). - Checkpointer State Resumption Without Redialing: In a server crash mid-incident, LangGraph state recovery must not re-dial the driver. By checking transaction logs in SQLite and PostgreSQL (
SqliteSaver/PostgresSaver), Sentinel resumes cleanly from the exact completed node without initiating duplicate calls.
Accomplishments That We're Proud Of
- 88 / 88 Passing Automated Regression Tests: 100% test pass rate across 12 suites in 5.20s—covering graph topology, monotonic reducers, OWASP prompt injection, telephony fallbacks, and full end-to-end webhook pipelines.
- Verified Live Telephony Execution: Documented in our live CALL-E billing ledger (
dashboard.heycall-e.com), proving a real 1-minute 24-second autonomous call (Call ID: 23db451665034286abd8c30a3414a56d) over production trunks. - Sub-4-Second End-to-End Fleet Reroute: Ingesting telematics, conducting driver triage, performing Gemini risk audits, and committing cross-dock reservations in under 4 seconds post-call.
- Regulatory Alignment: Built from day one to comply with FDA FSMA 21 CFR Part 1 audit requirements and FMCSA 49 CFR Part 395 HOS driver safety mandates.
What We Learned
- Determinism Over Generative Chaos: In high-liability domains like cold-chain pharma, deterministic state graphs with mathematical reducers (
monotonic-or) are far superior to open-ended ReAct agent loops. - Voice is the Ultimate Bridge: Commercial drivers cannot navigate complex apps while driving at 65 mph in freezing rain. Natural, structured voice phone calls via CALL-E bridge the physical highway and digital dispatch systems seamlessly.
- Defense-in-Depth for Telephony: Production voice AI requires immediate fail-safe escalation protocols the moment VoIP packets drop or carrier timeouts occur.
What's Next for Cold Chain Sentinel
- Multi-Carrier Telephony Failover: Implementing automated secondary carrier trunking if primary cellular routes drop with SIP 408 errors.
- Direct TMS/ELD Enterprise Connectors: Native certified webhooks for Samsara, Motive, Geotab, and McLeod Fleet Telematics.
- Multi-Lingual In-Cab Triage: Expanding CALL-E real-time voice prompts to Spanish, Punjabi, and French Canadian dialects for diverse North American freight corridors.
- Edge Deployment: Packaging Sentinel's 8-node state machine to run on edge compute gateways inside modern smart reefer trailers.
Built With
- asyncio
- call-e
- fastapi
- google-gemini
- iot
- langgraph
- llm
- logistics
- next.js
- owasp
- postgresql
- pydantic
- pytest
- python
- react
- rest-api
- server-sent-events
- sqlite
- tailwind-css
- telematics
- typescript
- uvicorn
- voice-ai
- webhooks
Log in or sign up for Devpost to join the conversation.