Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This project is an advanced agentic simulation that demonstrates the critical importance of predictive intelligence in supply chain management.

Notifications You must be signed in to change notification settings

tedahn/private-signals-simulation

Repository files navigation

Private Signals: Autonomous Supply Chain Simulation

App Screenshot

"The Danger Zone" of Automotive Manufacturing

This project is an advanced agentic simulation that demonstrates the critical importance of predictive intelligence in supply chain management. It models the interaction between Social Sentiment (Demand), Financial Health (Liquidity), and Global Logistics (Supply) to drive an autonomous Automotive OEM.

Key Features

1. The "Danger Zone" (Production Lag)

Real-world manufacturing has lead times. This simulation enforces a 4-step (approx. 8-second) commitment lag.

  • Planning: The AI Oracle sets a target based on current signals.
  • Locked: That target enters a queue and cannot be changed.
  • Execution: The factory builds the cars 8 seconds later. Result: If the AI fails to predict a recession, the "Locked" pipeline will continue to churn out cars into a dead market, causing massive inventory bloat ("Lot Rot").

2. Realistic P&L Model

The simulation runs a full financial backend:

  • Variable Costs: Parts & Labor ($32k/unit).
  • Fixed Costs: Factory Overhead ($20M/cycle).
  • Economies of Scale: Profitability requires high volume to absorb fixed costs. Low volume = Losses.
  • Active Feedback: The AI actively monitors Profit Margin. If it drops below 2%, it triggers a "PROFIT WARNING" protocol, hiking prices and cutting costs to survive.

3. Agent Federation

Three independent AI agents monitor the world:

  • Social Agent: Scrapes "Twitter/X" trends and Ad conversion rates.
  • Bank Agent: Monitors Interest Rates and Credit Rejection rates.
  • Supply Agent: Tracks Lithium spot prices and shipping delays.

These signals are fused by the Oracle (Central Node) to make decisions.

Visuals

  • Cyberpunk UI: A "Dark Mode" command center aesthetic.
  • Beam Visualization: Watch data packets travel from agents to the core.
  • Stats Sidebar: Tracks "Lifetime Sales" and "Inventory Stockpile" to prove long-term performance.
  • Financial Timeline: A real-time chart at the bottom visualizing Profit vs. Spend vs. Sales.

How to Run

Prerequisites

  • Python 3.9+
  • Node.js 16+

1. Start the Backend (Simulation Engine)

The backend is built with FastAPI and handles the agent logic.

cd backend
pip install -r requirements.txt
uvicorn main:app --reload

Server will start on http://localhost:8000

2. Start the Frontend (Command Center)

The frontend is a React application managing the visualization.

cd frontend
npm install
npm run dev

Open http://localhost:5173 in your browser.

License

MIT

About

This project is an advanced agentic simulation that demonstrates the critical importance of predictive intelligence in supply chain management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published