A simulated warehouse digital twin that replaces static FIFO queues with a dynamic, negotiated priority engine. Autonomous agents coordinate over A2A, and all state access goes through an MCP-style tool layer.
Built by Team Brute Force 6
- Quick Start
- Problem
- Solution
- Priority Scoring Formula
- Architecture
- Agents & MCP Tools
- Key Features
- Optional LLM-Assisted Features
- Tech Stack
- Project Structure
- Setup & Local Development
- Testing & Quality Assurance
- REST API & WebSocket Reference
- Production Cloud Deployment Guide
- Usage Guide
- Validation Targets
- Known Limitations & Roadmap
- Contributors
- License
Requires Python 3.11+, Node.js 20.9+, and Docker. The full walkthrough is in Setup & Local Development.
git clone https://github.com/Maharshi-Paul/a2a-digital-twin.git
cd a2a-digital-twin
cp .env.example .env
docker compose up -d # local PostgreSQL 16 + Redis 7
pip install -r backend/requirements.txt
cd backend && python -m uvicorn core.main:app --reload --port 8000In a second terminal:
cd frontend && npm install && npm run devOpen http://localhost:3000, click Seed DB, then Start Sim.
Quick-commerce dark stores and micro-fulfillment centers operate under strict SLA windows (for example, 10–30 minute deliveries). Yet conventional facilities rely on fixed FIFO (First-In, First-Out) order queues, and under FIFO:
- High-value orders close to breaching their SLA get stranded behind low-priority single-item orders with hours of slack.
- Pickers crowd the same aisles at the same time, creating physical bottlenecks on the floor.
- Work is released to picking without regard for packing-station availability, causing gridlock in the staging area.
The result is avoidable SLA penalties, uneven worker utilization, and fulfillment delays that a state-aware dispatch system can prevent.
A2A Digital Twin is an agentic, queue-aware warehouse simulation and orchestration platform. It replaces static FIFO dispatching with a dynamic priority engine run by autonomous specialist agents. The agents communicate over an Agent-to-Agent (A2A) message bus and read and update warehouse state through a standardized MCP (Model Context Protocol) tool layer.
graph LR
A[📦 Synthetic Order Stream] --> B[Order Coordinator]
B --> C[Dynamic Priority Engine]
C --> D[Inventory Agent]
C --> E[Picking Agent]
C --> F[Packing & Dispatch Agent]
C --> J[Dock Agent]
D <-->|A2A Bus - Redis Pub/Sub| E
E <-->|A2A Bus - Redis Pub/Sub| F
F <-->|A2A Bus - Redis Pub/Sub| J
D ---|MCP Tools| G[(Neon / PostgreSQL 16)]
E ---|MCP Tools| G
F ---|MCP Tools| G
J ---|MCP Tools| G
B -->|Native WebSocket ws://| H[📊 Live Next.js 16 Dashboard]
B -.->|Optional Sync| I[🔥 Firebase Firestore]
- Order ingestion. Poisson-distributed synthetic orders enter through the API and are registered by the Order Coordinator Agent.
- Dynamic priority scoring. Orders are continually scored and re-ranked with a 5-factor model covering SLA urgency, wait time, inventory readiness, aisle congestion, and packing capacity.
- Multi-agent negotiation. The specialist agents (Inventory, Picking, Packing & Dispatch, and Dock) negotiate assignments over the A2A Redis message bus.
- Standardized state access. State reads and status changes go through decoupled MCP tools backed by an async SQLAlchemy database layer.
- Real-time telemetry. State is broadcast over a native WebSocket channel (
/ws/live) with a 25-second heartbeat and cold-start health probes, feeding the Next.js 16 Mission Control Dashboard. - Policy benchmarking. Synthetic workloads can be replayed deterministically across a FIFO baseline, rule-based dynamic priority, and LLM-assisted batch re-ranking for side-by-side comparison.
Note
Data authenticity and no lock-in
- Backend-computed state: Priority scores, SLA countdowns, aisle congestion metrics, and inter-agent dialogues are all calculated by the FastAPI backend and broadcast over native WebSockets and REST.
- Facility canvas: The 2D SVG floorplan maps real PostgreSQL shelf inventory and worker coordinates onto an interactive canvas.
- No Firebase dependency: The app runs entirely on WebSockets and REST endpoints. Firebase Firestore sync is optional and disabled by default.
The dynamic priority engine scores every pending order on each tick with a weighted multi-factor function:
| Factor | Weight | Formula / Definition | Objective |
|---|---|---|---|
| SLA Risk | Expedite orders approaching SLA breach | ||
| Wait Time | Prevent queue starvation for older orders | ||
| Inventory Readiness | Prioritize orders that are ready to pick immediately | ||
| Aisle Congestion | Route pickers away from crowded aisles | ||
| Packing Capacity | Throttle picking when packing tables are full |
The weights sum to W_SLA_RISK, W_WAIT_TIME, W_INVENTORY_READINESS, W_AISLE_CONGESTION, and W_PACKING_CAPACITY.
graph TB
subgraph FE["FRONTEND — Next.js 16 (App Router + Turbopack)"]
KPI["9 Live KPI Cards<br/>Sparkline Trends"]
MAP["Interactive SVG Floorplan<br/>Shelf Heatmap & Workers"]
CHAT["Agent Dialogue Stream<br/>Live Decision Traces"]
CTRL["Simulation Controls<br/>Speed: 1x / 2x / 4x"]
end
SYNC(["🔌 Native WebSocket (/ws/live) · REST API (/api) · 🔥 Optional Firestore"])
subgraph BE["BACKEND — FastAPI (Python 3.11+)"]
subgraph CORE["core/ — Framework Layer"]
A2A["A2A Message Bus<br/>(Redis Pub/Sub)"]
MCPR["MCP Tool Registry<br/>(Decoupled State Access)"]
QE["Queue Engine<br/>(Dynamic Scorer & FIFO)"]
DB_ENG["Dual Database Engine<br/>Pooled + Unpooled DDL"]
end
subgraph DOMAIN["domains/warehouse/ — Domain Logic"]
AGENTS["Autonomous Agents<br/>Order, Inventory, Picking, Packing, Dock"]
MCPT["Warehouse MCP Tools<br/>(SKU, Zones, Workers, Docks)"]
SCORER["Multi-Factor Scorer"]
SIM["Poisson Order Generator<br/>& Database Seeder"]
LLM["LLM Re-Ranker & Commentary<br/><i>(Optional Gemini 2.5)</i>"]
end
end
subgraph DATA["DATA & INFRASTRUCTURE"]
PG[("Neon Serverless PostgreSQL 16<br/>(PgBouncer Pooled + Direct DDL)")]
RD[("Redis 7 / Upstash Redis<br/>(rediss:// TLS Support)")]
end
FE <--> SYNC
SYNC <--> BE
QE --> SCORER
QE -.optional.-> LLM
A2A <--> AGENTS
MCPR <--> MCPT
MCPT <--> DB_ENG
DB_ENG <--> PG
A2A <--> RD
| Agent | Responsibility | Key Interactions |
|---|---|---|
| 🎯 Order Coordinator | Orchestrator & dispatcher | Ingests incoming orders, triggers periodic queue scoring, negotiates task assignments, streams live traces |
| 📦 Inventory Agent | Stock & replenishment | Audits SKU availability across shelves (A-1 to D-6), reserves stock for claimed orders, issues restock warnings |
| 🏃 Picking Agent | Floor & picker operations | Dispatches idle pickers to zones, tracks picker paths, reports aisle congestion factors |
| 📤 Packing & Dispatch | Staging & fulfillment | Monitors packing bench capacity, turns picked totes into completed parcels, manages dispatch readiness |
| 🚢 Dock Agent | Outbound loading | Manages dock door staging and courier handover workflows |
All state access is mediated by MCP tools registered with WarehouseMCPToolRegistry:
| MCP Tool | Description | Parameters |
|---|---|---|
get_inventory_for_sku |
Fetch current stock count and shelf locations for a SKU | sku_id: int |
get_all_workers |
Retrieve status, assigned tasks, and current coordinates of all workers | None |
get_available_workers |
Fetch idle workers qualified for pick/pack dispatch | None |
get_zone_congestion |
Calculate active picker density across all warehouse zones (A–D) | None |
get_packing_status |
Inspect utilization, queue depth, and status of packing stations | None |
get_dock_status |
Inspect loading bays, doors, and courier assignment status | None |
search_sku |
Search the product catalog by SKU name or category | query: str |
Every tool can also be called directly over HTTP with POST /mcp/invoke, and listed with GET /mcp/tools.
- 🔄 Dynamic multi-factor queue engine: Orders are re-scored and re-sorted continuously based on SLA risk, worker locations, inventory presence, and congestion.
- 🤖 Decoupled A2A negotiation: Specialist agents hand off tasks asynchronously over Redis Pub/Sub, with no tight coupling between them.
- 🗺️ Interactive SVG warehouse map: A floorplan with shelf heatmaps (A-1 through D-6), live picker locations, packing stations, and loading docks.
- 📊 Real-time Mission Control dashboard: 9 live KPI counters with sparklines, a zone busyness index, and throughput-vs-FIFO comparison charts.
- 💬 Live agent activity feed: A real-time stream of inter-agent messages, decision traces, and order progress.
- 🧠 Optional Gemini commentary and re-ranking: Read-only decision narration and opt-in batch queue re-ranking via Google's Gemini API, with an automatic fallback to rule-based scoring.
- ⚡ Dual-engine database layer: Built for serverless Neon PostgreSQL, using pooled connections for queries and unpooled connections for DDL.
- 🔌 Native WebSocket streaming: State updates over
/ws/live, with cold-start detection and keep-alive heartbeats. - 🎮 Simulation controls: Seed the database, start and stop order generation, and switch speed (1×, 2×, 4×) on the fly.
- 🌗 Polished UI: Dark/light theme toggle, glassmorphic cards, toast notifications, and a responsive layout.
The platform is fully functional without any LLM (LLM_PROVIDER=none). Google's Gemini API can optionally be enabled for two independent capabilities, both designed to fail safe.
- Generates a short natural-language explanation of why the dynamic engine ranked the top order #1 on the current tick.
- Strictly read-only: it runs after the queue has already been ranked and never changes queue order or decision outcomes.
- Sends the pending order queue to Gemini in a single batch call per tick (never per order).
- Returns a re-ordering tagged
ranked_by: "llm", with a justification for each order.
- Bounded latency and cost: Exactly one API call per scoring tick.
- Hard timeout: Defaults to 1.0 s (
LLM_RERANK_TIMEOUT_SECONDS). If the LLM doesn't respond in time, the tick falls back to rule-based scoring. - Order cap: If the queue exceeds
LLM_RERANK_MAX_ORDERS(default 50), the system uses rule-based scoring to avoid token exhaustion. - Strict ID validation: The response must contain exactly the same set of order IDs. Any dropped, extra, or duplicated ID causes the response to be rejected, and scoring falls back to the rule-based result.
- No state changes: The LLM can only reorder existing IDs. It cannot create orders or modify warehouse state.
| Domain | Technology | Purpose |
|---|---|---|
| Backend framework | FastAPI 0.115+ (Python 3.11+) | Async REST API & WebSocket server |
| Agent messaging | Redis 7 / Upstash Redis | Agent-to-Agent (A2A) pub/sub message bus |
| State & database | Neon Serverless PostgreSQL 16 | Relational store via SQLAlchemy 2.0 + asyncpg |
| State registry | MCP-style tool registry | Standardized agent state-access layer |
| LLM engine (optional) | Google Gemini 2.5 (google-genai SDK) |
Batch re-ranking & decision commentary |
| Frontend framework | Next.js 16.3 (Turbopack, App Router) | Mission Control web dashboard |
| Styling & icons | CSS Modules + Lucide React | Glassmorphic UI & iconography |
| Visualization | Recharts + SVG canvas | Real-time trend charts & floorplan map |
| Cloud hosting | Vercel (frontend) + Render (backend) | Free-tier deployment |
| Containerization | Docker & Docker Compose | Local development and containerized deployment |
a2a-digital-twin/
├── backend/
│ ├── core/ # Framework layer (domain-agnostic)
│ │ ├── a2a/ # A2A message bus & Redis connection
│ │ ├── agents/ # BaseAgent abstraction
│ │ ├── api/ # Domain-agnostic routes (/health)
│ │ ├── mcp/ # Base MCP registry interfaces
│ │ ├── models/ # Core models (AgentMessage, DecisionRecord)
│ │ ├── queue_engine/ # Base priority queue abstractions
│ │ ├── simulation/ # Base simulation runner
│ │ ├── config.py # Pydantic Settings with multi-env loader
│ │ ├── database.py # Async SQLAlchemy dual engine (pooled + unpooled)
│ │ └── main.py # FastAPI lifespan application entrypoint
│ │
│ ├── domains/warehouse/ # Warehouse business domain
│ │ ├── agents/ # Order, Inventory, Picking, Packing, Dock agents
│ │ ├── api/ # REST routes (/api/*) & WebSocket (/ws/live)
│ │ ├── mcp/ # 7 warehouse MCP tools & HTTP adapter
│ │ ├── models/ # Order, SKU, Zone, Shelf, Worker, Station models
│ │ ├── queue_engine/ # 5-factor scorer, FIFO baseline, Gemini re-ranker
│ │ ├── services/ # WarehouseService & Gemini decision commentary
│ │ └── simulation/ # Poisson order generator & database seeder
│ │
│ ├── tests/ # Automated test suite (14 tests)
│ │ ├── test_database_config.py # Database protocol normalization & SSL tests
│ │ ├── test_decision_commentary.py # LLM commentary safety & fallback tests
│ │ └── test_llm_reranker.py # LLM batch re-ranker & timeout safety tests
│ │
│ ├── Dockerfile # Multi-stage production backend container
│ ├── requirements.txt # Backend Python dependencies
│ └── .env.example # Backend-specific environment template
│
├── frontend/
│ ├── src/
│ │ ├── app/ # Next.js App Router (layout, page, globals)
│ │ ├── core/ # Shared frontend infrastructure
│ │ │ ├── api/ # REST client with cold-start detection
│ │ │ ├── hooks/ # useWebSocket hook with keep-alive heartbeat
│ │ │ └── types/ # Core TypeScript definitions
│ │ ├── domains/warehouse/ # Warehouse UI components & views
│ │ │ ├── components/ # WarehouseMap, QueueCard, KpiCard, ChatFeed
│ │ │ ├── views/ # DashboardView (Mission Control)
│ │ │ └── live-twin.ts # Computed state & metric aggregation
│ │ └── lib/ # Firebase initialization (optional)
│ │
│ ├── package.json # Frontend dependencies (Next 16, React 19)
│ ├── tsconfig.json # TypeScript compiler settings
│ ├── vercel.json # Vercel deployment blueprint
│ └── next.config.ts # Next.js configuration
│
├── assets/ # Project posters, screenshots, architecture diagrams
│ └── A2A_Digital_Twin_Poster.png
├── docker-compose.yml # Local PostgreSQL 16 + Redis 7 infrastructure
├── Dockerfile # Root multi-stage container build
├── render.yaml # Render Web Service infrastructure-as-code
├── neon.ts # Neon Postgres branch lifecycle configuration
├── package.json # Monorepo root scripts & Neon CLI dependencies
├── .env.example # Root environment variable template
├── CONTRIBUTORS.md # Team member contributions
├── LICENSE # MIT License
└── README.md # Documentation
- Python 3.11+ (3.12 recommended)
- Node.js 20.9+ and npm (required by Next.js 16)
- Docker Desktop, or local PostgreSQL 16 and Redis 7 instances
- (Optional) A Google Gemini API key for the LLM features (Google AI Studio)
- (Optional) Neon Postgres and Upstash Redis accounts, if you want to develop against cloud services
git clone https://github.com/Maharshi-Paul/a2a-digital-twin.git
cd a2a-digital-twinThe backend looks for .env at the project root or inside backend/:
cp .env.example .env| Variable | Default | Description |
|---|---|---|
DOMAIN |
warehouse |
Active domain logic |
DATABASE_URL |
postgresql+asyncpg://wdt_user:wdt_pass@localhost:5432/warehouse_twin |
Primary database connection (pooled for PgBouncer / Neon) |
DATABASE_URL_UNPOOLED |
Optional | Direct, unpooled connection string for Neon schema creation (DDL) |
DB_STATEMENT_CACHE_SIZE |
0 |
Keep at 0 for PgBouncer compatibility |
DB_POOL_SIZE |
5 |
SQLAlchemy async connection pool size |
DB_MAX_OVERFLOW |
5 |
Maximum pool overflow connections |
REDIS_URL |
redis://localhost:6379/0 |
Redis connection URL (rediss:// supported for TLS) |
REDIS_MAX_CONNECTIONS |
10 |
Redis connection pool cap |
API_HOST |
0.0.0.0 |
Backend bind host |
API_PORT |
8000 |
Backend bind port |
CORS_ORIGINS |
http://localhost:3000 |
Allowed frontend origins (comma-separated) |
FRONTEND_URL |
Optional | Additional production frontend URL |
QUEUE_TICK_SECONDS |
10.0 |
Interval between priority-queue scoring cycles |
QUEUE_ENGINE_MODE |
rule_based |
Scoring mode: rule_based or llm_batch
|
QUEUE_ENGINE_IDLE_WHEN_EMPTY |
true |
Skip scoring when no orders are pending |
W_SLA_RISK |
0.35 |
Weight |
W_WAIT_TIME |
0.15 |
Weight |
W_INVENTORY_READINESS |
0.25 |
Weight |
W_AISLE_CONGESTION |
0.10 |
Weight |
W_PACKING_CAPACITY |
0.15 |
Weight |
SIMULATION_SEED |
42 |
Random seed for deterministic replay |
SIMULATION_LAMBDA |
3.0 |
Poisson order arrival rate (orders per minute) |
LLM_PROVIDER |
none |
LLM switch: none or gemini
|
GEMINI_API_KEY |
None | Google AI Studio API key |
LLM_MODEL |
gemini-2.5-flash-lite |
Gemini model name |
LLM_RERANK_TIMEOUT_SECONDS |
1.0 |
Maximum wait for batch LLM re-ranking |
LLM_RERANK_MAX_ORDERS |
50 |
Maximum orders per batch before falling back |
ADMIN_TOKEN |
None | Optional shared token that protects simulation endpoints |
NEXT_PUBLIC_API_URL |
http://localhost:8000 |
Backend base URL used by the frontend |
NEXT_PUBLIC_WS_URL |
ws://localhost:8000/ws/live |
WebSocket endpoint used by the frontend |
To run PostgreSQL and Redis locally:
docker compose up -d
docker ps # expect wdt_postgres and wdt_redis both "Up"Tip
Using cloud databases (Neon PostgreSQL, Upstash Redis)? Skip Docker Compose and point DATABASE_URL and REDIS_URL at your cloud endpoints.
Backend (a virtual environment is recommended):
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r backend/requirements.txtFrontend:
cd frontend
npm install
cd ..cd backend
python -m uvicorn core.main:app --reload --host 0.0.0.0 --port 8000On startup the backend automatically:
- Connects to PostgreSQL and verifies the schema using the unpooled engine.
- Seeds default zones (A, B, C, D), shelves (A-1 to D-6), SKUs, workers, and packing stations.
- Opens the Redis A2A message bus connection.
- Initializes all 5 autonomous agents.
- Starts the periodic queue scoring engine and order generator.
Useful endpoints:
- Swagger UI: http://localhost:8000/docs
- Health check: http://localhost:8000/health
- Live WebSocket:
ws://localhost:8000/ws/live
In a separate terminal:
cd frontend
npm run devOpen http://localhost:3000 to see the Mission Control dashboard.
The automated suite covers database URL normalization, SSL auto-negotiation, the PgBouncer statement-cache setting, Gemini decision commentary, and the LLM batch re-ranker's safety fallbacks.
From the repository root:
python -m pytest backend/tests -o pythonpath=backend -vOr from inside backend/:
cd backend
pytest -vtest_database_config.py- Normalizes
postgres://andpostgresql://URLs topostgresql+asyncpg://. - Strips
sslmode=requirequery parameters for asyncpg and replaces them with a validssl.SSLContext. - Confirms
statement_cache_size=0is set for PgBouncer poolers.
- Normalizes
test_decision_commentary.py- Verifies that commentary never alters queue scores.
- Tests timeout resilience and fallback behavior when the Gemini API is unreachable.
test_llm_reranker.py- Tests single-batch re-ranking against mock Gemini responses.
- Verifies rejection of responses with missing, extra, or duplicate order IDs.
- Verifies fallback to rule-based scoring on network timeouts and queue-size overflow.
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Basic liveness probe ({"status": "healthy"}) |
GET |
/health?detailed=true |
Deep probe that runs a live database query |
GET |
/docs |
Interactive Swagger UI |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/simulation/status |
Current status and total generated order count |
POST |
/api/simulation/start |
Start the Poisson order generator |
POST |
/api/simulation/stop |
Pause order generation |
POST |
/api/simulation/seed |
Reset and re-seed the warehouse layout, SKUs, and stations |
Note
If ADMIN_TOKEN is set, mutation endpoints require the header X-Admin-Token: <token>.
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/orders |
List orders, with optional status, limit, and offset |
GET |
/api/orders/counts |
Order counts by status |
GET |
/api/queue |
Current priority ranking with factor scores and breakdown |
GET |
/api/queue/fifo |
Baseline FIFO order sequence |
GET |
/api/queue/comparison |
Side-by-side comparison of AI priority and FIFO ranks |
GET |
/api/warehouse/status |
Snapshot of zones, shelves, workers, and stations |
GET |
/api/warehouse/kpis |
Live KPIs (waiting time, utilization, SLA breach rate) |
GET |
/api/agent-logs |
Recent inter-agent negotiation messages from the A2A bus |
GET |
/api/decisions/traces |
Full negotiation traces and resolution outcomes |
GET |
/api/decisions/records |
Step-by-step decision records and agent reasoning |
| Method | Endpoint | Description |
|---|---|---|
GET |
/mcp/tools |
List all registered MCP tools and their parameter schemas |
POST |
/mcp/invoke |
Invoke a tool: {"tool_name": "...", "parameters": {...}} |
- Endpoint:
ws://localhost:8000/ws/live(wss://...in production) - Payload: a JSON snapshot every tick, containing:
warehouse: facility state, zone congestion, worker locations, and packing loads.queue: current queue scores, top-order breakdown, and comparison metrics.kpis: 9 live operational KPIs with historical sparklines.agent_logs: latest agent conversations and decision rationales.
- Heartbeat: the server pings every 25 seconds to prevent proxy timeouts.
The platform is designed to run on free tiers: Vercel for the frontend, Render for the backend, Neon for managed PostgreSQL, and Upstash or Render Key Value for Redis.
graph LR
V["Vercel<br/>Next.js 16 app"] <-->|WebSocket / REST| R["Render<br/>FastAPI container"]
R --> N[("Neon<br/>PostgreSQL")]
R --> U[("Upstash<br/>Redis")]
- Create a serverless PostgreSQL instance at neon.tech.
- From the Neon dashboard, copy both connection strings:
DATABASE_URL: the pooled (PgBouncer) string, whose host ends in-pooler.DATABASE_URL_UNPOOLED: the direct string, used for DDL schema creation.
- The backend strips incompatible parameters (such as
sslmode), configures an SSL context, and setsstatement_cache_size=0automatically.
- Create a Redis database at upstash.com, or use Render Key Value.
- For Upstash, copy the TLS URL, which starts with
rediss://. - The backend negotiates TLS automatically (
ssl_cert_reqs="none"), so certificate-validation errors don't occur.
-
Connect your repository on render.com.
-
Choose the Docker runtime, using either
backend/Dockerfileor the rootrender.yamlblueprint. -
Set these environment variables in the Render dashboard:
PORT=8000 DATABASE_URL=postgresql+asyncpg://<neon-pooled-url> DATABASE_URL_UNPOOLED=postgresql+asyncpg://<neon-unpooled-url> REDIS_URL=rediss://<upstash-redis-url> CORS_ORIGINS=https://your-frontend.vercel.app FRONTEND_URL=https://your-frontend.vercel.app QUEUE_TICK_SECONDS=10.0 QUEUE_ENGINE_MODE=rule_based LLM_PROVIDER=none
-
Set Render's health check path to
/health.
-
Import your GitHub repository on vercel.com.
-
Set the Root Directory to
frontend. -
Add these environment variables:
NEXT_PUBLIC_API_URL=https://your-backend.onrender.com NEXT_PUBLIC_WS_URL=wss://your-backend.onrender.com/ws/live
-
Deploy. The frontend detects Render free-tier cold starts and shows a waking-up indicator until the backend is ready.
- Launch Mission Control: open http://localhost:3000.
- Seed the database: click Seed DB in the header to populate (or reset) zones, shelves, SKUs, workers, and stations.
- Start the simulation: click Start Sim to activate the Poisson order generator.
- Monitor operations:
- KPI strip: total orders, active pickers, SLA breach rate, and throughput.
- Warehouse floorplan: pickers moving between zones A to D while shelf inventory depletes.
- Priority queue: the 5-factor score breakdown behind each order's rank.
- Throughput vs. FIFO: how dynamic priority reduces SLA breaches compared with the FIFO baseline.
- Agent activity feed: live negotiation between the Order, Inventory, Picking, and Packing agents.
- Change the simulation speed: use the
1x,2x, and4xbuttons. - Switch theme: toggle dark or light mode from the navigation bar.
Policies are compared on identical synthetic order streams (SIMULATION_SEED=42). These are the outcomes the engine is designed to achieve relative to FIFO:
| Metric | Description | Expected Outcome vs. FIFO |
|---|---|---|
| Average waiting time | Time from order creation to pick assignment | Significant reduction for multi-item and high-urgency orders |
| Throughput | Orders completed and dispatched per hour | Higher sustained throughput by avoiding packing congestion |
| Picker utilization | Ratio of active picking time to idle transit time | More balanced distribution across zones, with less picker crowding |
| SLA breach rate | Share of orders delivered past their SLA deadline | Measurable drop from prioritizing urgent orders |
| Packing bottleneck | Queue depth of totes waiting for packing benches | Smoother packing queue via feedback-driven picking throttling |
| LLM fallback rate | How often llm_batch falls back to rule-based scoring |
Tracked to confirm the system stays available when the API is slow or rate-limited |
- Synthetic data only: orders come from a Poisson generator, and there is no live warehouse management system (WMS) integration yet.
- Single facility: the twin models one dark store.
- Cold starts: on Render's free tier, the first load after idle can be slow while the backend wakes up.
- Bounded LLM re-ranking: a 1.0 s timeout and a 50-order cap apply, and beyond them scoring falls back to the rule-based engine.
- Minimal access control: protection is limited to the optional shared
ADMIN_TOKEN, with no user accounts or roles.
- Dynamic 5-factor priority scorer with configurable real-time weights
- Autonomous A2A multi-agent architecture coordinated over Redis Pub/Sub
- Standardized MCP tool layer with 7 warehouse tools and HTTP invocation
- No Firebase dependency (native WebSockets and REST)
- Optional Gemini 2.5 integration for decision commentary and batch re-ranking, with automatic fallback
- Cloud deployment guides and blueprints for Vercel, Render, Neon, and Upstash
- Multi-facility orchestration across multiple dark stores and regional hubs
- Real-world WMS connectors for live feeds from Manhattan Associates, Blue Yonder, and SAP EWM
- Autonomous AGV navigation via ROS2 for automated guided vehicle dispatching
- Role-based access control with user authentication for enterprise warehouse staff
See CONTRIBUTORS.md for team members and roles.
This project is licensed under the MIT License. See the LICENSE file for details.
