How ahamed-safnas/cold-chain-logistics-ai-assistant works
This repository implements a cold-chain logistics incident assistant: dispatchers ask operational questions, an agent can retrieve fleet telemetry, live corridor conditions, and compliance guidance, then presents a response and records execution traces. Separate ingestion scripts load legacy fleet data into SQL and index policy documents in Pinecone. The excerpts show the principal tool and ingestion paths; UI audit logging is only partially excerpted, and several documented product claims cannot be verified from the available source.
Main entry points: agent_tools.py Operational tools · orchestrator.py LLM reasoner · ui.py Command center · ingest_sop_pinecone.py Policy ingestion
Components 19
Dispatcher experience
- Command center
src/ui.py - SQL audit log
- Audit log viewer
src/ui.py
Incident reasoning
- Agent graph
src/orchestrator.py - LLM reasoner
src/orchestrator.py - Tool dispatch
src/orchestrator.py - Operational tools
src/agent_tools.py - Fleet SQL view
- Weather API
- SOP retrieval
src/agent_tools.py - Pinecone index
- Configured LLM
Data preparation
- Policy documents
data/policy - Policy ingestion
scripts/ingest_sop_pinecone.py - Ingestion hash cache
data/cache/ingestion_hash_cache.json - Fleet dataset
data/raw/dynamic_supply_chain_logistics_dataset.csv - Legacy fleet loader
scripts/ingest_legacy_data.py - Legacy SQL table
Other components
- Dispatcher
Connections 18
- Dispatcher → Command center: submits queries
src/ui.py - Command center → Agent graph: streams agent updates
src/ui.py - Agent graph → LLM reasoner: starts reasoning
src/orchestrator.py - LLM reasoner → Configured LLM: invokes model
src/orchestrator.py - LLM reasoner → Tool dispatch: routes tool calls
src/orchestrator.py - Tool dispatch → Operational tools: executes registered tools
src/orchestrator.py - Tool dispatch → LLM reasoner: returns tool results
src/orchestrator.py - Operational tools → Fleet SQL view: queries fleet view
src/agent_tools.py - Operational tools → Weather API: fetches conditions
src/agent_tools.py - Operational tools → SOP retrieval: invokes retrieval
src/agent_tools.py - SOP retrieval → Pinecone index: searches index
src/agent_tools.py - Policy documents → Policy ingestion: supplies source files
scripts/ingest_sop_pinecone.py - Policy ingestion → Pinecone index: upserts chunks
scripts/ingest_sop_pinecone.py - Policy ingestion → Ingestion hash cache: reads and updates hashes
scripts/ingest_sop_pinecone.py - Fleet dataset → Legacy fleet loader: provides fleet rows
scripts/ingest_legacy_data.py - Legacy fleet loader → Legacy SQL table: writes legacy table
scripts/ingest_legacy_data.py - Command center → SQL audit log: writes execution traces
src/ui.py - Audit log viewer → SQL audit log: queries audit records
src/ui.py