How codebykabilesh/supplymind works
The repository combines shipment monitoring and response with a separate supply-chain control-tower workflow. Shipment creation or Kafka GPS updates feed transport event detection and a decision graph; that graph can recommend routes, assess risk, and call demand, supplier, and warehouse services. The warehouse service manages buffer stock and can request a restock suggestion. A second API invokes its own inventory/supplier/orchestrator agent chain. Some referenced modules are absent from the supplied tree, so they are not represented as repository nodes; external integrations are shown only where the excerpts document calls.
Main entry points: graph.py Shipment decision graph · Transport_agent/main.py Shipment API · kafka_listener.py GPS listener · Warehouse_agent/main.py Warehouse API
Components 29
Transport monitoring
- Shipment API
Transport_agent/main.py - Shipment records
Transport_agent/database.py - Shipment model
Transport_agent/models.py - GPS listener
Transport_agent/kafka_listener.py - Event detection
Transport_agent/event_detector.py - Weather lookup
Transport_agent/weather.py - Geocoding and ETA
Transport_agent/maps.py
Disruption decisions
- Shipment decision graph
Transport_agent/graph.py - Risk prediction
Transport_agent - Route suggestions
Transport_agent - Transport recommendations
Transport_agent/llm.py
Warehouse service
- Warehouse API
Warehouse_agent/main.py - Inventory records
Warehouse_agent/database.py - Buffer activation
Warehouse_agent/buffer.py - Restock suggestion client
Warehouse_agent/main.py
Control tower agents
- Healing API
server.py - Agent-chain workflow
main.py - Inventory agent
main.py - Supplier agent
main.py - Decision agent
main.py
Other components
- Shipment operator
- GPS event producer
producer.py - Kafka shipment events
- Demand suggestion service
demand_agent/main.py - Supplier restock service
supplier_agent/supplier_agent.py - Event history
- Control-tower database
main.py - Groq language model
- Frontend client
Connections 37
- Shipment operator → Shipment API: creates shipment
Transport_agent/main.py - Shipment API → Shipment records: stores shipment
Transport_agent/main.py - Shipment API → Shipment model: queries records
Transport_agent/main.py - GPS event producer → Kafka shipment events: publishes updates
- Kafka shipment events → GPS listener: delivers events
Transport_agent/kafka_listener.py - GPS listener → Shipment records: updates location
Transport_agent/kafka_listener.py - GPS listener → Shipment model: loads shipment
Transport_agent/kafka_listener.py - GPS listener → Event detection: detects disruption
Transport_agent/kafka_listener.py - Event detection → Weather lookup: gets weather
Transport_agent/event_detector.py - Event detection → Geocoding and ETA: gets ETA
Transport_agent/event_detector.py - GPS listener → Shipment decision graph: invokes graph
Transport_agent/kafka_listener.py - Shipment API → Shipment decision graph: invokes graph
Transport_agent/main.py - Shipment API → Event detection: detects event
Transport_agent/main.py - Shipment API → Shipment records: updates risk
Transport_agent/main.py - Shipment decision graph → Risk prediction: predicts risk
Transport_agent/graph.py - Shipment decision graph → Route suggestions: suggests route
Transport_agent/graph.py - Shipment decision graph → Transport recommendations: requests advice
Transport_agent/graph.py - Shipment decision graph → Warehouse API: activates buffer
Transport_agent/graph.py - Shipment decision graph → Warehouse API: checks inventory
Transport_agent/graph.py - Shipment decision graph → Demand suggestion service: requests quantities
Transport_agent/graph.py - Shipment decision graph → Supplier restock service: requests restock
Transport_agent/graph.py - Warehouse API → Inventory records: reads and writes
Warehouse_agent/main.py - Warehouse API → Buffer activation: activates stock
Warehouse_agent/main.py - Warehouse API → Restock suggestion client: requests suggestion
Warehouse_agent/main.py - Buffer activation → Inventory records: updates stock
Warehouse_agent/buffer.py - GPS listener → Event history: logs event
Transport_agent/kafka_listener.py - Shipment operator → Healing API: starts healing
server.py - Healing API → Agent-chain workflow: invokes workflow
server.py - Agent-chain workflow → Inventory agent: runs first
main.py - Agent-chain workflow → Supplier agent: runs next
main.py - Agent-chain workflow → Decision agent: runs final
main.py - Inventory agent → Control-tower database: reads inventory
main.py - Supplier agent → Control-tower database: reads disruptions
main.py - Inventory agent → Groq language model: requests analysis
main.py - Supplier agent → Groq language model: requests action
main.py - Decision agent → Groq language model: requests decision
main.py - Healing API → Frontend client: returns results
server.py