<aside>
An intelligent customer support platform orchestrated by Google's Agent Development Kit (ADK).
🎯 Problem Statement
The Challenge: E-commerce businesses face significant hurdles in scaling support:
The Solution: A Multi-Agent Architecture where specialized AI workers collaborate to handle inquiries, execute code, and manage inventory data instantly, with persistent memory and quality tracking.
🤖 Why Multi-Agent?
Traditional chatbots use a single LLM prompt, leading to hallucinations and generic answers. This system uses a swarm of specialized agents:

🏗️ System Architecture
The project follows a clean Monorepo structure separating the reactive frontend from the logic-heavy backend.
📂 Project Structure
multi-agent-ecommerce/
├── 🐳 .devcontainer/ # Standardized Development Environment
├── 📂 backend/ # FastAPI Application
│ ├── 📂 agents/ # Google ADK Agent Logic
│ ├── 📂 database/ # SQLite & Memory Persistence
│ ├── 📂 routers/ # API Endpoints (Chat, Metrics)
│ └── 📄 main.py # Entry Point
├── 📂 frontend/ # Streamlit Application
│ ├── 📂 pages/ # UI Pages (Chat, Dashboard)
│ └── 📄 Home.py # Landing Page
├── 📄 ARCHITECTURE.md # Deep dive into system design
└── 📄 DEPLOYMENT.md # Production deployment guide
✨ Key Features
1. Intelligent Orchestration
Uses Google ADK to route queries. If a user asks "How much is the iPhone 15 plus 20% tax?", the Coordinator invokes the Product Agent to get the price and then the Calculation Agent to compute the total.
2. Persistent Memory (Stateful)
Unlike basic RAG bots, this system remembers.
3. Real-Time Quality Engineering
Includes a custom QualityTracker class that monitors:
🚀 Setup Instructions
Prerequisites
Installation
Clone the repository
git clone <https://github.com/AlvLeoAl/multi-agent-ecommerce-support.git>
cd multi-agent-ecommerce-support
Create Virtual Environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\\Scripts\\activate
Install Dependencies
pip install -r requirements.txt
Configure Environment Create a .env file in the root:
GOOGLE_API_KEY=your_api_key_here
Run the System Terminal 1 (Backend):
uvicorn backend.main:app --reload --port 8000
Terminal 2 (Frontend):
cd frontend
streamlit run Home.py
🛠️ Technology Stack
Core Principles
This system implements Google's AgentOps best practices as outlined in the "Prototype to Production" whitepaper:
Technology Stack

AgentOps Lifecycle
1. Observe Phase
Comprehensive telemetry collection implemented via the QualityTracker class:
class QualityTracker:
"""Implements Observe phase of AgentOps cycle"""
def track_conversation(self, metrics: Dict):
# Logs: Granular event recording
self._log_interaction(metrics)
# Traces: Request flow tracking
self._trace_agent_path(metrics)
# Metrics: Aggregated performance
self._update_dashboards(metrics)
Metrics tracked:
2. Act Phase
Real-time operational control:
3. Evolve Phase
Continuous improvement workflow:
Multi-Agent Architecture
Coordinator Pattern
The system uses a hierarchical multi-agent pattern where a coordinator delegates to specialists:
coordinator = Agent(
name="customer_support_coordinator",
instruction="""You are a customer support coordinator.
Delegate queries to specialist agents:
- general_agent: Greetings, FAQs
- product_agent: Product search, recommendations
- calculation_agent: Pricing, math operations
""",
sub_agents=[general_agent, product_agent, calculation_agent]
)
Specialist Agents
| --- | --- | --- | --- |
Agent-to-Agent (A2A) Communication
Current Implementation: Local Sub-Agents
# Tightly-coupled local agents
coordinator = Agent(
sub_agents=[agent1, agent2, agent3] # In-process
)
Production-Ready: A2A Protocol
Upgrade path for distributed agents:
</aside>




View GitHub Repository: