feat: Python Self-Healing Supply Chain Demo (Interactive + Gemini 3)#13
Conversation
…ling-supply-chain-python
pr_description.md
Outdated
|
|
||
| ### 2. Install Dependencies | ||
| ```bash | ||
| pip install fastapi uvicorn requests python-dotenv |
There was a problem hiding this comment.
add instructions to create a venv before installing dependencies
| ### 2. Install Dependencies | ||
| ```bash | ||
| pip install fastapi uvicorn requests python-dotenv | ||
| # Note: google-adk, ucp-sdk, ap2-sdk are currently mocked or included in this demo structure. |
There was a problem hiding this comment.
can you explain this? I actually need to install these dependencies to be able to run the demo
|
|
||
| ### 2. Install Dependencies | ||
| ```bash | ||
| pip install fastapi uvicorn requests python-dotenv |
| ### 2. Install Dependencies | ||
| ```bash | ||
| pip install fastapi uvicorn requests python-dotenv | ||
| # Note: google-adk, ucp-sdk, ap2-sdk are currently mocked or included in this demo structure. |
There was a problem hiding this comment.
also, please add versions in the dependencies. consider adding requirements.txt instead
There was a problem hiding this comment.
actually, saw there's a requirements.txt. just update this instruction then.
README.md
Outdated
There was a problem hiding this comment.
please put all the sample content under a2a/ - also move the existing sample under cymbal-retail-agent
| * Google GenAI API Key | ||
|
|
||
| ### 1. Environment Configuration | ||
| Create a `.env.local` file in the root directory: |
There was a problem hiding this comment.
clarify this is not the actual root, but the base directory for this sample
|
Thanks for the feedback @damaz91 - all the suggestion have been incorporated |
feat: Python Self-Healing Supply Chain Demo (Interactive + Gemini 3)
📝 Summary
This PR adds a comprehensive Python sample demonstrating an Autonomous Supply Chain Agent capable of "Self-Healing" when a primary supplier fails. It leverages the Google Agent Development Kit (ADK) and the latest Gemini 3 Flash model to orchestrate a recovery workflow using UCP (Commerce) and AP2 (Governance) protocols.
✨ Key Features
InventoryManagerwhere users simulate sales. The Autonomous Restock triggers automatically when inventory drops below a critical threshold./.well-known/ucpinstead of hardcoded endpoints, demonstrating true network autonomy.PARTNER_20) to finalize Tax and Totals.google-genai(Gemini 3 Flash Preview) and standardpydanticmodels for UCP/AP2 schemas.🏗️ Architecture
buyer_agent.py: The ADK Agent utilizing a "Brain + Tools" pattern.supplier_server.py: A lightweight Mock UCP Server (FastAPI) that handles Discovery, Checkout Negotiation, and Mandate Verification.mock_db.py: Simulates a Product Catalog and Corporate Spending Policy.🧪 How to Test
90units) to drop inventory below 20.✅ Checklist
README.mdwith production architecture diagrams..env.local(excluded from git).requirements.txt.