1- # Demo: Zava AI Shopping Assistant <br /> Multi-Agent Architecture - Overview
1+ # Demo: Zava AI Shopping Assistant <br /> Multi-Agent Architecture with A2A Protocol - Overview
22
33Costa Rica
44
55[ ![ GitHub] ( https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff )] ( https://github.com/ )
66[ brown9804] ( https://github.com/brown9804 )
77
8- Last updated: 2025-11-12
8+ Last updated: 2025-12-03
99
1010----------
1111
@@ -16,36 +16,77 @@ Last updated: 2025-11-12
1616
1717> [ !IMPORTANT]
1818> The deployment process typically takes 15-20 minutes
19+ >
1920> 1 . Adjust [ terraform.tfvars] ( ./terraform-infrastructure/terraform.tfvars ) values
2021> 2 . Initialize terraform with ` terraform init ` . Click here to [ understand more about the deployment process] ( ./terraform-infrastructure/README.md )
2122> 3 . Run ` terraform apply ` , you can also leverage ` terraform apply -auto-approve ` .
2223
2324## Key Features
2425
25- - ** Multi-Agent Architecture** : Few specialized AI agents working in concert:
26- - ** Cora (Shopper)** : Front-facing assistant for general queries.
27- - ** Inventory Manager** : Checks stock availability.
28- - ** Customer Loyalty** : Manages rewards and discounts.
29- - ** Cart Manager** : Handles shopping cart operations.
30- - ** Real Azure AI Agents** : Integrates with ** Azure AI Foundry** to create and host persistent agents (not just local simulations).
31- - ** Zero-Touch Deployment** : A single [ terraform apply] ( ./terraform-infrastructure/README.md ) command handles the entire lifecycle from infrastructure to application code.
32- - ** Intelligent Routing** : A dedicated Handoff Service classifies user intent and routes messages to the appropriate specialist agent.
33- - ** Data Pipeline Automation** : Automatically ingests product catalogs into Cosmos DB and builds Vector Search indexes.
26+ - ** A2A Protocol Implementation** : Complete Agent-to-Agent communication framework with standardized messaging, event handling, and task coordination
27+ - ** Multi-Agent Architecture** : Specialized AI agents working through A2A protocol:
28+ - ** Cora (Shopper)** : Front-facing assistant for general queries
29+ - ** Inventory Manager** : Checks stock availability via A2A requests
30+ - ** Customer Loyalty** : Manages rewards and discounts through agent coordination
31+ - ** Cart Manager** : Handles shopping cart operations with inter-agent communication
32+ - ** Real Azure AI Agents** : Integrates with ** Azure AI Foundry** to create and host persistent agents (not just local simulations)
33+ - ** Zero-Touch Deployment** : A single [ terraform apply] ( ./terraform-infrastructure/README.md ) command handles the entire lifecycle including A2A framework deployment
34+ - ** A2A Intelligent Routing** : Enhanced Handoff Service that supports both traditional routing and A2A protocol agent discovery
35+ - ** Data Pipeline Automation** : Automatically ingests product catalogs with A2A event notifications and coordination
36+
37+ ## About A2A Protocol
38+
39+ ` A2A (Agent-to-Agent) Protocol is a standardized communication framework that enables multiple AI agents to collaborate and coordinate tasks seamlessly. `
40+
41+ > What is A2A Protocol?
42+
43+ - ** Agent-to-Agent Communication** : Structured messaging between multiple AI agents
44+ - ** Task Coordination** : Agents can delegate tasks to specialized agents
45+ - ** Event-Driven Architecture** : Real-time event handling for agent interactions
46+ - ** Agent Discovery** : Automatic detection and registration of available agents
47+ - ** Protocol Standardization** : Consistent API for inter-agent communication
48+
49+ > A2A Components in This Project:
50+
51+ - ** Agent Execution Framework** : Manages multiple agent instances (` src/a2a/server/agent_execution.py ` )
52+ - ** Event Queue System** : Handles inter-agent communication (` src/a2a/server/events/ ` )
53+ - ** Task Management** : Coordinates work between agents (` src/a2a/server/tasks.py ` )
54+ - ** Request Handlers** : Processes agent-to-agent requests (` src/a2a/server/request_handlers.py ` )
55+ - ** Coordinator Agent** : Orchestrates multi-agent workflows (` src/a2a/agent/coordinator.py ` )
56+ - ** API Endpoints** : RESTful and WebSocket APIs for agent communication (` src/a2a/api/ ` )
57+
58+ > A2A vs Traditional Multi-Agent Systems:
59+
60+ - ** Standardized Protocol** : Uses consistent message formats and APIs
61+ - ** Scalable Architecture** : Easily add new agents without modifying existing ones
62+ - ** Real-time Communication** : WebSocket support for instant agent interactions
63+ - ** Event-Driven** : Asynchronous event handling for better performance
64+ - ** Infrastructure Integration** : Full Terraform deployment with monitoring and automation
3465
3566## Architecture
3667
3768``` mermaid
3869graph TD
3970 User[User] <--> UI[Chat Interface]
4071 UI <--> App[FastAPI Application]
41- App <--> Handoff[Handoff Service]
42- Handoff -->|Classifies Intent| Router{Router}
72+ App <--> A2A[A2A Protocol Server]
73+ A2A <--> EventQueue[Event Queue]
74+ A2A <--> Coordinator[A2A Coordinator]
75+
76+ Coordinator -->|A2A Protocol| Router{Agent Router}
77+ Router -->|Task Delegation| Cora[Cora Agent]
78+ Router -->|Design Tasks| Design[Interior Design Agent]
79+ Router -->|Inventory Events| Inventory[Inventory Agent]
80+ Router -->|Loyalty Tasks| Loyalty[Loyalty Agent]
81+ Router -->|Cart Events| Cart[Cart Agent]
4382
44- Router -->|General| Cora[Cora Agent]
45- Router -->|Design| Design[Interior Design Agent]
46- Router -->|Stock| Inventory[Inventory Agent]
47- Router -->|Rewards| Loyalty[Loyalty Agent]
48- Router -->|Checkout| Cart[Cart Agent]
83+ subgraph "A2A Communication"
84+ EventQueue <--> Cora
85+ EventQueue <--> Design
86+ EventQueue <--> Inventory
87+ EventQueue <--> Loyalty
88+ EventQueue <--> Cart
89+ end
4990
5091 Inventory -->|Query| Search[Azure AI Search]
5192 Inventory -->|Lookup| Cosmos[Cosmos DB]
@@ -57,32 +98,40 @@ graph TD
5798
58991 . ** Infrastructure Provisioning** :
59100 - Creates Resource Group, Cosmos DB, Azure AI Foundry, AI Search, Storage Account, Key Vault, and Container Registry (ACR).
60- - Deploys AI Models (` gpt-4o-mini ` , ` text-embedding-3-small ` ).
101+ - Deploys AI Models (` gpt-4o-mini ` , ` text-embedding-3-small ` ).
102+ - Sets up A2A protocol infrastructure including event queues and monitoring.
61103
62104 <img width =" 1859 " height =" 900 " alt =" image " src =" https://github.com/user-attachments/assets/cd24ab7f-5ddd-46de-b266-0d0a24c45803 " />
63105
64- 2 . ** Data Pipeline Execution** :
106+ 2 . ** A2A Framework Deployment** :
107+ - Initializes the Agent-to-Agent protocol server components.
108+ - Sets up event queue system for inter-agent communication.
109+ - Configures agent discovery and registration services.
110+ - Deploys A2A monitoring and automation frameworks.
111+
112+ 3 . ** Data Pipeline Execution** :
65113 - Sets up a Python virtual environment.
66- - Ingests ` product_catalog.csv ` into Cosmos DB.
114+ - Ingests ` product_catalog.csv ` into Cosmos DB with A2A event notifications .
67115
68116 < https://github.com/user-attachments/assets/41bf0976-0ca8-47fe-a2fa-8750bcc6f848 >
69117
70- - Creates and populates an Azure AI Search index with vector embeddings.
118+ - Creates and populates an Azure AI Search index with vector embeddings through A2A coordination .
71119
72120 < https://github.com/user-attachments/assets/37c4a8cd-73e1-4392-8755-fb018481d8cb >
73121
74- 3 . ** Agent Creation** :
122+ 4 . ** Agent Creation & A2A Registration ** :
75123 - Installs the ` azure-ai-projects ` SDK.
76124 - Connects to Azure AI Foundry.
77- - Provisions 5 real agents with specific instructions and tool definitions
78- - Saves the unique Agent IDs to the ` .env ` file.
125+ - Provisions 5 real agents with A2A protocol integration and specific instructions.
126+ - Registers agents with the A2A discovery service.
127+ - Saves the unique Agent IDs and A2A endpoints to the ` .env ` file.
79128
80129 <img width =" 1907 " height =" 990 " alt =" image " src =" https://github.com/user-attachments/assets/4234ead4-16e0-4bec-bbfd-3b8891d113b0 " />
81130
82- 4 . ** Application Deployment** :
83- - Builds the Docker container in the cloud (ACR Build).
84- - Configures the Azure Web App with the generated Agent IDs and credentials.
85- - Deploys the container and restarts the app.
131+ 5 . ** Application Deployment** :
132+ - Builds the Docker container with A2A protocol support in the cloud (ACR Build).
133+ - Configures the Azure Web App with the generated Agent IDs, A2A endpoints, and credentials.
134+ - Deploys the container with A2A server components and restarts the app.
86135
87136## Verification
88137
@@ -91,25 +140,31 @@ graph TD
911401 . ** Check the Web App** :
92141 - The Terraform output will provide the ` application_url ` .
93142 - Visit ` https://<your-app-name>.azurewebsites.net ` .
94- - You should see the Zava chat interface.
143+ - You should see the Zava chat interface with A2A protocol support .
95144
96145 < https://github.com/user-attachments/assets/a1139528-6b37-4ac2-a1cb-771788ff45a4 >
97146
98- 2 . ** Verify Agents** :
147+ 2 . ** Verify A2A Protocol Endpoints** :
148+ - Check A2A Chat API: ` https://<your-app-name>.azurewebsites.net/a2a/chat `
149+ - Check A2A Server API: ` https://<your-app-name>.azurewebsites.net/a2a/api/docs `
150+ - Verify agent discovery: ` https://<your-app-name>.azurewebsites.net/a2a/server/agents `
151+
152+ 3 . ** Verify Agents** :
99153 - Go to the [ Azure AI Foundry Portal] ( https://ai.azure.com ) .
100154 - Navigate to your project -> ** Build** -> ** Agents** .
101- - You should see all 5 agents listed.
155+ - You should see all 5 agents listed with A2A protocol integration .
102156
103157 < https://github.com/user-attachments/assets/3c562ccd-cff3-4a30-b9f8-44111fb71113 >
104158
105- 3 . ** Test Interactions** : For example:
106- - ** General** : "Hi, who are you?" (Handled by Cora)
107- - ** Inventory** : "Do you have the classic leather sofa in stock?" (Handled by Inventory Agent)
108- - ** Design** : "What colors of green paint do you have?"
159+ 4 . ** Test A2A Interactions** : For example:
160+ - ** General** : "Hi, who are you?" (Handled by Cora via A2A protocol)
161+ - ** Inventory** : "Do you have the classic leather sofa in stock?" (Routed through A2A to Inventory Agent)
162+ - ** Design** : "What colors of green paint do you have?" (A2A task delegation to Design Agent)
163+ - ** Multi-Agent** : "Find a sofa and check my loyalty points" (A2A coordination between multiple agents)
109164
110165<!-- START BADGE -->
111166<div align =" center " >
112- <img src =" https://img.shields.io/badge/Total%20views-1611 -limegreen " alt =" Total views " >
167+ <img src =" https://img.shields.io/badge/Total%20views-1624 -limegreen " alt =" Total views " >
113168 <p >Refresh Date: 2025-12-03</p >
114169</div >
115170<!-- END BADGE -->
0 commit comments