A production-ready distributed system for multi-agent communication, collaboration, and knowledge sharing. Built with AutoGen, featuring real-time WebSocket communication, ChromaDB vector database integration, Redis message queuing, and intelligent agent routing. Enables scalable agent-to-agent collaboration with automatic discovery, load balancing, and knowledge sharing capabilities.
- ** Distributed Agent Architecture**: Multiple agents running across different nodes with automatic discovery
- ** Real-Time Communication**: WebSocket-based agent-to-agent messaging
- ** Production Vector Database**: ChromaDB integration for semantic search and knowledge retrieval
- ** Message Queue System**: Redis-based message queuing for reliable agent communication
- ** Intelligent Routing**: Automatic agent discovery and intelligent message routing
- ** Load Balancing**: Distribute agent workloads across available nodes
- ** Knowledge Sharing**: Agents can share and retrieve knowledge from a shared vector store
- ** Monitoring Dashboard**: Real-time monitoring of agent activities and system health
- Distributed Agent Architecture: Multiple agents running across different nodes with automatic discovery
- Real-Time Communication: WebSocket-based agent-to-agent messaging
- Production Vector Database: ChromaDB integration for semantic search and knowledge retrieval
- Message Queue System: Redis-based message queuing for reliable agent communication
- Agent Discovery & Routing: Automatic agent discovery and intelligent message routing
- Load Balancing: Distribute agent workloads across available nodes
- Knowledge Sharing: Agents can share and retrieve knowledge from a shared vector store
- Monitoring Dashboard: Real-time monitoring of agent activities and system health
- Researcher Agent: Gathers and synthesizes information from multiple sources
- Analyst Agent: Performs deep analysis on provided data
- Coordinator Agent: Orchestrates multi-agent workflows
- Knowledge Agent: Manages and retrieves information from the vector database
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Agent Node 1 β β Agent Node 2 β β Agent Node 3 β
β β β β β β
β βββββββββββββ β β βββββββββββββ β β βββββββββββββ β
β β Researcherβ β β β Analyst β β β βCoordinatorβ β
β βββββββ¬ββββββ β β βββββββ¬ββββββ β β βββββββ¬ββββββ β
β β β β β β β β β
ββββββββββΌβββββββββ ββββββββββΌβββββββββ ββββββββββΌβββββββββ
β β β
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
ββββββββββββββ΄βββββββββββββ
β β
βββββββββΌβββββββββ ββββββββββΌβββββββββ
β Redis Queue β β ChromaDB β
β (Messaging) β β (Knowledge) β
ββββββββββββββββββ βββββββββββββββββββ
β β
ββββββββββββββ¬βββββββββββββ
β
ββββββββββββββΌβββββββββββββ
β API Gateway β
β (FastAPI + WebSocket) β
βββββββββββββββββββββββββββ
The easiest way to get started is using Docker Compose:
# Clone the repository
git clone <repository-url>
cd distributed_agent_platform
# Set up environment variables
cp env.example .env
# Edit .env and add your GEMINI_API_KEY
# Start the platform
docker-compose up --build# Clone the repository
git clone <repository-url>
cd distributed_agent_platform
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
# Start Redis (if not running)
# On macOS with Homebrew:
brew services start redis
# On Linux:
sudo systemctl start redis
# On Windows, download and run Redis
# Run the platform
python main.pypython main.pyThis will start:
- FastAPI server on
http://localhost:8000 - WebSocket server on
ws://localhost:8001 - Agent discovery service
- Vector database service
Open your browser to http://localhost:8000 to access the monitoring dashboard.
from backend.agents.researcher_agent import ResearcherAgent
from backend.core.agent_manager import AgentManager
# Initialize agent manager
manager = AgentManager()
# Create a researcher agent
researcher = ResearcherAgent(
name="researcher_1",
system_message="You are a research agent specialized in gathering information."
)
# Register agent
manager.register_agent(researcher)# Send a message from one agent to another
message = {
"from": "researcher_1",
"to": "analyst_1",
"content": "Please analyze this data: ...",
"type": "analysis_request"
}
manager.send_message(message)distributed_agent_platform/
βββ backend/
β βββ agents/
β β βββ __init__.py
β β βββ base_agent.py # Base agent class
β β βββ researcher_agent.py # Researcher agent implementation
β β βββ analyst_agent.py # Analyst agent implementation
β β βββ coordinator_agent.py # Coordinator agent implementation
β β βββ knowledge_agent.py # Knowledge management agent
β βββ core/
β β βββ __init__.py
β β βββ agent_manager.py # Agent lifecycle management
β β βββ message_router.py # Message routing logic
β β βββ discovery_service.py # Agent discovery
β β βββ load_balancer.py # Load balancing
β βββ services/
β β βββ __init__.py
β β βββ vector_service.py # ChromaDB integration
β β βββ queue_service.py # Redis queue management
β β βββ websocket_service.py # WebSocket communication
β βββ models/
β βββ __init__.py
β βββ message.py # Message models
β βββ agent.py # Agent models
βββ frontend/
β βββ static/
β β βββ css/
β β βββ js/
β βββ templates/
β βββ index.html # Dashboard UI
βββ tests/
β βββ test_agents.py
β βββ test_routing.py
β βββ test_vector_service.py
βββ main.py # Application entry point
βββ requirements.txt
βββ README.md
GET /health- Health checkGET /agents- List all registered agentsPOST /agents/register- Register a new agentDELETE /agents/{agent_id}- Unregister an agentPOST /messages/send- Send a message between agentsGET /messages/{agent_id}- Get messages for an agentGET /metrics- System metrics
ws://localhost:8001/ws/{agent_id}- Agent WebSocket connection- Messages:
{"type": "message", "to": "agent_id", "content": "..."}
Edit .env to configure:
- Gemini API: Set your API key
- Redis: Configure Redis connection
- ChromaDB: Set persistence directory
- Server: Configure host and ports
- Agents: Set limits and timeouts
The platform includes built-in monitoring:
- Agent status and health
- Message throughput
- Queue depth
- Vector database statistics
- System resource usage
Access the dashboard at http://localhost:8000 for real-time monitoring.
# Run all tests
pytest
# Run with coverage
pytest --cov=backend --cov-report=html
# Run specific test file
pytest tests/test_agents.py- Framework: FastAPI (async Python web framework)
- Agent Framework: Microsoft AutoGen
- Vector Database: ChromaDB (semantic search & embeddings)
- Message Queue: Redis (distributed messaging)
- Real-time: WebSockets (bidirectional communication)
- Embeddings: Sentence Transformers
- Language: Python 3.9+
- Multi-Agent Research Systems: Coordinate multiple research agents to gather and synthesize information
- Distributed AI Workflows: Orchestrate complex AI tasks across multiple specialized agents
- Knowledge Management: Build intelligent knowledge bases with semantic search capabilities
- Agent Orchestration: Manage and coordinate multiple AI agents in production environments
- Real-time Agent Communication: Enable instant messaging between distributed agents
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Microsoft AutoGen for the agent framework
- FastAPI for the web framework
- ChromaDB for vector database capabilities