System Design: Multi-Agent System
Explore the design and implementation of a multi-agent system addressing shipment rerouting during logistics disruptions. Understand how specialized agents, each responsible for subproblems like disruption detection and recommendation, coordinate under orchestration. Learn about data sources, agent tools, protocols for integration, and evaluation criteria to build reliable systems deployable in real-world logistics environments.
The decomposition gave us six subproblems, three architectural constraints, and a clear boundary between what the system can automate and what requires a coordinator to decide. In this lesson, we design the actual system. Each agent maps to one subproblem, and every major design decision we make connects back to a constraint the case study surfaced. The system has two layers.
A set of specialized agents, each responsible for one subproblem.
An orchestration layer that coordinates how those agents are triggered, sequenced, and run in parallel.
Before we design individual agents, we establish what data is available to the system.
Data sources
There are five data sources ...
Source | Role | Access Pattern |
Tomorrow.io FleetIQ | Route-level weather risk scores and severe-event alerts | REST API, scheduled polling |
Portcast Port Congestion API | Berth wait times, vessel queue depth, and terminal-level congestion scores for contracted ports | REST API, scheduled polling |
project44 | Carrier exception signals from EDI (Electronic Data Interchange, the standard protocol carriers use for structured status updates) feeds; also exposes carrier slot availability and rate quotes | REST API, polled and on-demand |
SAP TM REST API | System of record for all active shipments; supports read for shipment lookup and write for rerouting execution | REST API; write operations require a human approval signal |
Approved-carrier database | Approved carrier lists per shipment type, maintained by the operations team | Relational database, read-only |
The SAP TM write ...