Skip to content

G26karthik/SupplySentinel

Repository files navigation

πŸ›‘οΈ SupplySentinel β€” Autonomous Multi-Agent AI for Supply Chain Risk Protection

Python LLM Agents Monitoring Deployment UI

A single mining strike in Chile can shut down an EV factory in California. SupplySentinel detects that BEFORE contracts are broken and production halts.


🌍 Live Demo

Resource Link
πŸš€ Web App (no setup) https://supply-sentinel-144683821783.us-central1.run.app/
πŸŽ₯ Demo Video https://youtu.be/fiqA1lf8PQk
πŸ“‚ Repository https://github.com/G26karthik/SupplySentinel

⚑ What it Does (30-sec summary)

Instead of procurement teams manually tracking thousands of global signals, SupplySentinel automates the entire pipeline:

Step Human Effort Today With SupplySentinel
Identify critical raw materials Hours 0
Monitor global risk signals Impossible 24/7 autonomous
Validate credibility of threats Manual interpretation AI-driven severity scoring
Prevent alert spam Rarely Built-in deduplication
Detect disruption early Usually too late Before impact

You say:

β€œI manufacture aerospace components in Germany.”

The system then: β†’ finds critical materials β†’ maps producing countries β†’ searches live news globally β†’ scores disruption risk β†’ alerts only when relevant + non-duplicate


🧠 Why Agents (Not Just One LLM Prompt)

Agent Responsibility
Config Agent Business β†’ critical materials + countries
Watchman Agent Live disruption scanning via Google Search tool
Analyst Agent Scores severity + triggers retry when evidence is weak
Dispatcher Agent Issues alerts & suppresses duplicates

πŸ”„ Autonomy

If Watchman returns insufficient evidence, Analyst commands a retry with expanded search scope (not hardcoded branching).

🧠 Memory

Persistent JSON state across runs:

  • suppliers.json
  • alert_history.json
  • metrics_history.json

πŸƒ Continuous Monitoring

Streamlit UI OR CLI long-running mode β€” supports 24/7 monitoring.


πŸ“ Architecture (Full)

flowchart TD
    Start([Business Description]) --> Config[πŸ€– Config Agent]
    Config -->|Material/Country Map| Map[(πŸ“Š suppliers.json)]
    Map --> Loop{For Each Material}
    Loop --> Watchman1[πŸ” Watchman β€” Material + Location]
    Watchman1 --> Analyst1[πŸ“Š Analyst]
    Analyst1 -->|Risk > 0| Dispatcher
    Analyst1 -->|Risk = 0 β†’ Retry| Watchman2[πŸ” Watchman β€” Global Scope]
    Watchman2 --> Analyst2[πŸ“Š Analyst β€” Reevaluate]
    Analyst2 --> Dispatcher
    Dispatcher -->|Critical| Alert[🚨 Alert]
    Dispatcher -->|Safe| Safe[🟒 Mark Safe]
    Dispatcher -->|Duplicate| Skip[⏭ Skip]
    Alert --> Memory[(alert_history.json)]
    Safe --> Memory
    Skip --> Memory
    Memory --> Loop
Loading

πŸ” Simplified Orchestration Overview

%% simplified orchestration diagram
graph LR
    Core([πŸ€– SupplySentinel<br/>Orchestrator]):::main

    subgraph Loop [Autonomous Detection Loop]
        direction LR
        Watchman(πŸ” Watchman Agent):::agent
        Analyst(πŸ“Š Analyst Agent):::agent
        Watchman -->|News| Analyst
        Analyst -->|Retry Cmd| Watchman
        Google(πŸ”§ Google Search Tool):::tool --- Watchman
    end

    Config(πŸ€– Config Agent):::agent
    Dispatcher(πŸ“€ Dispatcher Agent):::agent
    Memory(πŸ’Ύ alert_history.json):::tool

    Core --> Config
    Core --> Loop
    Core --> Dispatcher
    Core --> Memory

    classDef main fill:#2E4F2F,stroke:#4d7f4d,stroke-width:2px,color:#fff;
    classDef agent fill:#333,stroke:#fff,stroke-width:1px,color:#fff,rx:20,ry:20;
    classDef tool fill:#333,stroke:#888,stroke-width:1px,color:#ccc,rx:5,ry:5;

Loading

πŸ§ͺ Example Output

"I manufacture electric vehicles in California"

Critical Materials:
β€’ Lithium β€” Chile
β€’ Cobalt β€” DRC
β€’ Rare Earths β€” China

Result:
Watchman β†’ insufficient evidence
Analyst β†’ RETRY triggered
Watchman (global scope) β†’ disruption detected
Risk Score = 8/10 β†’ Critical Alert (not duplicate)

🟦 Who Would Use This (Real Roles in Enterprises)

Persona Value
VP of Supply Chain See disruptions before revenue loss
Procurement Manager Avoid SLA penalties
Risk & Compliance Proactive risk mitigation
Logistics & Operations Forward planning before shortages
Sourcing Analyst Visibility into tier-2 / tier-3 suppliers

This is not a chatbot β€” it is a risk defense system.


πŸ§ͺ Try These Prompts (for demo & onboarding)

Copy into Web App:

Prompt Industry
I manufacture EV batteries in Texas Automotive / Energy
I build medical devices in Germany MedTech
I produce military-grade semiconductors in Japan Electronics / Defense
I run a wind turbine assembly plant in Denmark Renewable energy
I manufacture aerospace components in France Aerospace

πŸ“Š Value Delivered

Business Metric Impact
Monitoring effort Reduced from daily manual checks β†’ fully automated
Alert noise Duplicate and low-value alerts suppressed to prevent fatigue
Risk visibility Reveals tier-2 and tier-3 supplier exposure normally invisible to procurement teams
Downtime prevention Disruptions detected early enough to act before production impact

πŸ’» Quick Start (Local)

git clone https://github.com/G26karthik/SupplySentinel.git
cd SupplySentinel
pip install -r requirements.txt
streamlit run app.py

➑ No .env required β€” API key entered in UI.


πŸͺ΅ Project Structure

SupplySentinel/
β”œβ”€β”€ app.py                # Web UI
β”œβ”€β”€ supply_sentinel.py    # CLI monitor
β”œβ”€β”€ config_agent.py
β”œβ”€β”€ watchman_agent.py
β”œβ”€β”€ analyst_agent.py
β”œβ”€β”€ dispatcher_agent.py
β”œβ”€β”€ logging_config.py
β”œβ”€β”€ metrics_tracker.py
β”œβ”€β”€ logs/
└── README.md

🌐 Deployment

gcloud run deploy supply-sentinel \
  --source . \
  --allow-unauthenticated \
  --region us-central1

Fully deployed version already live on Google Cloud Run.


🧭 Roadmap

Stage Status
Multi-agent autonomy βœ… complete
Logging & metrics βœ… complete
Cloud deployment βœ… complete
Parallel scanning πŸ”œ in development
ERP + Slack/Teams integration πŸ”œ planned
Predictive cost impact modeling πŸ”œ planned

⭐ Support

If this project interests you, consider giving the repo a ⭐ β€” it helps more developers discover it.


πŸ“ License

MIT License


πŸ‘ Acknowledgment

Built for the Google Γ— Kaggle Agents Intensive β€” Enterprise Track (Nov 2025).


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors