Skip to content

Commit f763323

Browse files
authored
Merge pull request #2 from cyberholics/a2a-customer-routing
A2a customer routing
2 parents e0fcf73 + 1313005 commit f763323

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

a2a_customer_routing/README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,49 @@ User Message → Coordinator Agent → Sentiment Analysis → Routing Decision
2020
Final Response to User
2121
```
2222

23+
## Demo
24+
25+
![Customer Support Demo](https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExenV4a3ViM29zeXF6cTgwbHU0NHdwaXhlM2s3NWM2N2JjaTk5cHBrbyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/QYH53ZP7ObQyk7kNbu/giphy.gif)
26+
27+
*Streamlit interface for customer query routing and resolution*
28+
2329
## Agent Overview
2430

2531
| Agent | Port | Purpose | Technology |
2632
|-------|------|---------|------------|
2733
| **Coordinator** | 10023 | Orchestrates workflow and routing | Llama 3.1 8B |
2834
| **Intake** | 10020 | Sentiment analysis (positive/neutral/negative) | Llama 3.1 8B |
29-
| **Resolution** | 10021 | Knowledge base search and answers | Qwen 235B |
35+
| **Resolution** | 10021 | Knowledge base search and answers | Qwen3-30B-A3B |
3036
| **Escalation** | 10022 | Human support escalation | Llama 3.1 8B |
3137

38+
3239
## Features
3340

3441
- **Intelligent Routing**: Automatic sentiment-based message routing
3542
- **Knowledge Base Integration**: Semantic search through FAQ database
3643
- **Human Escalation**: Automatic escalation for negative sentiment cases
37-
- **Distributed Architecture**: Each agent runs independently via A2A protocol
38-
- **Scalable Design**: Easy to add new agents or modify existing ones
3944
- **Interactive UI**: Streamlit-based web interface for easy interaction
4045

46+
## Technology Stack & Integrations
47+
48+
### A2A (Agent-to-Agent) Protocol
49+
The system leverages the [A2A protocol](https://github.com/a2aproject/A2A) to enable communication between distributed agents. Each agent operates independently while maintaining coordinated workflows through standardized message passing.
50+
51+
### Google ADK (Agent Development Kit) Integration
52+
[Google's ADK](https://google.github.io/adk-docs/) is used to build the intelligent agents (Coordinator, Intake, and Escalation) in this system.
53+
54+
### Nebius AI Studio
55+
[Nebius AI Studio](https://studio.nebius.com/) the underlying AI model infrastructure for all agents in the system
56+
- **Integration Methods**:
57+
- **ADK Pipeline**: Uses LiteLLM integration to connect Google ADK agents to Nebius models
58+
- **[LlamaIndex](https://www.llamaindex.ai/) Pipeline**: Direct integration for knowledge base operations and semantic search capabilities
59+
- **Models Used via Nebius AI API**:
60+
- **Llama 3.1 8B**: Powers the Coordinator, Intake, and Escalation agents for sentiment analysis and workflow orchestration
61+
- **Qwen/Qwen3-30B-A3B**: Handles knowledge base query resolution and complex question answering in the Resolution agent
62+
- **Qwen/Qwen3-Embedding-8B**: Generates semantic embeddings for document indexing and similarity search
63+
64+
65+
4166
## Prerequisites
4267

4368
- Python 3.8+
@@ -133,3 +158,4 @@ Response: "I understand your frustration. A human agent will contact you shortly
133158
2. Open the Streamlit interface in your browser
134159
3. Enter customer queries to see the intelligent routing in action
135160
4. Monitor the console output to see agent-to-agent communication
161+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""
2+
Customer query routing and resolution multi-agent.
3+
4+
This package contains agents for intelligent customer support routing
5+
based on sentiment analysis using the A2A protocol.
6+
"""

a2a_customer_routing/multi_agent/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def create_llm_model(model_name: str):
3737
return LiteLlm(model=model_name, api_key=api_key, temperature=0.1)
3838

3939
llama_8b = create_llm_model("nebius/meta-llama/Meta-Llama-3.1-8B-Instruct")
40-
qwen = create_llm_model("nebius/Qwen/Qwen3-235B-A22B")
40+
qwen = create_llm_model("nebius/Qwen/Qwen3-30B-A3B")
4141

4242
intake_agent = LlmAgent(name="intake_agent", model=llama_8b, description="Classifies sentiment", instruction="Use the classify_fn tool. Return ONLY the classification result (positive, neutral, or negative).", tools=[classify_fn])
4343
resolution_agent = LlmAgent(name="resolution_agent", model=qwen, description="Answers questions from a KB", instruction="Use resolve_query_fn. If the tool returns 'KB_ANSWER:', return only the text after it. Otherwise, say you don't have information.", tools=[resolve_query_fn])

a2a_customer_routing/multi_agent/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self):
5353
api_key = os.getenv("NEBIUS_API_KEY")
5454

5555
self.index = VectorStoreIndex(
56-
nodes, embed_model=NebiusEmbedding(model_name="BAAI/bge-multilingual-gemma2", api_key=api_key)
56+
nodes, embed_model=NebiusEmbedding(model_name="Qwen/Qwen3-Embedding-8B", api_key=api_key)
5757
)
5858
self.query_engine = self.index.as_query_engine(
5959
response_mode="tree_summarize", similarity_top_k=3,

0 commit comments

Comments
 (0)