You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agentic_rag/README.md
+267-7Lines changed: 267 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -458,6 +458,112 @@ python local_rag_agent.py --query "How to implement a queue?" --collection "Repo
458
458
459
459
The agentic_rag system now includes full support forthe Agent2Agent (A2A) protocol, enabling seamless communication and collaboration with other AI agents. This integration transforms the system into an interoperable agent that can participatein multi-agent workflows and ecosystems.
460
460
461
+
### 3.0 Distributed Chain of Thought Architecture
462
+
463
+
The system implements a **distributed multi-agent Chain of Thought (CoT)** architecture where each specialized agent can run on separate servers and communicate via the A2A protocol. This enables:
464
+
465
+
- **True Distributed Processing**: Each agent (Planner, Researcher, Reasoner, Synthesizer) can run on different servers
466
+
- **Scalable Agent Deployment**: Deploy agents independently based on resource requirements
467
+
- **Agent-to-Agent Communication**: All communication happens via A2A protocol using agent IDs and remote URLs
468
+
- **Load Balancing**: Distribute workload across multiple servers for better performance
|`synthesizer_agent_v1`| Information Synthesizer | Response generation | Combines steps into coherent final answer |
557
+
558
+
#### Benefits of Distributed Architecture
559
+
560
+
1. **Resource Optimization**: Deploy resource-intensive agents (Researcher) on GPU servers, lighter agents on CPU servers
561
+
2. **Fault Tolerance**: If one agent fails, others continue functioning
562
+
3. **Independent Scaling**: Scale specific agents based on load (e.g., multiple Researcher instances)
563
+
4. **Technology Flexibility**: Each agent can use different LLM backends (GPT-4, Claude, Ollama, etc.)
564
+
5. **Security Isolation**: Sensitive operations can run in isolated environments
565
+
6. **Geographic Distribution**: Deploy agents closer to data sources for lower latency
566
+
461
567
### 3.1 Why A2A Protocol Implementation?
462
568
463
569
**Enhanced Interoperability**: The A2A protocol enables the agentic_rag system to communicate with other AI agents using a standardized protocol, breaking down silos between different AI systems and frameworks.
@@ -488,10 +594,12 @@ The system supports the following A2A protocol methods:
488
594
489
595
- `document.query`: Query documents using RAG with intelligent routing
490
596
- `document.upload`: Process and store documents in vector database
"context": [{"content": "Research findings about ML algorithms..."}]
738
+
},
739
+
"id": "8"
740
+
}'
741
+
742
+
# Query the Synthesizer Agent
743
+
curl -X POST http://localhost:8000/a2a \
744
+
-H "Content-Type: application/json" \
745
+
-d '{
746
+
"jsonrpc": "2.0",
747
+
"method": "agent.query",
748
+
"params": {
749
+
"agent_id": "synthesizer_agent_v1",
750
+
"query": "How does machine learning work?",
751
+
"reasoning_steps": [
752
+
"ML is a subset of AI...",
753
+
"It uses algorithms to learn from data...",
754
+
"Key components include training and inference..."
755
+
]
756
+
},
757
+
"id": "9"
758
+
}'
759
+
```
760
+
577
761
### 3.5 Testing A2A Implementation
578
762
579
763
The A2A implementation includes comprehensive tests covering all functionality:
@@ -601,9 +785,11 @@ The test suite includes:
601
785
- **Error Handling**: Error condition testing
602
786
- **Model Validation**: Data model testing
603
787
604
-
### 3.6 A2A Agent Card
788
+
### 3.6 A2A Agent Cards
605
789
606
-
The system publishes its capabilities through an agent card:
790
+
The system publishes its capabilities through agent cards. There is a main agent card for the RAG system and individual cards for each specialized CoT agent:
791
+
792
+
#### Main RAG Agent Card
607
793
608
794
```json
609
795
{
@@ -617,6 +803,15 @@ The system publishes its capabilities through an agent card:
617
803
"description": "Query documents using RAG with context retrieval",
618
804
"input_schema": { ... },
619
805
"output_schema": { ... }
806
+
},
807
+
{
808
+
"name": "agent.query",
809
+
"description": "Query specialized CoT agents for distributed reasoning",
0 commit comments