๐ Multi-Branch Repository: This repository showcases Project Synapse in two complementary implementations:
- ๐
educational-simulation
: A comprehensive educational simulation with detailed documentation, perfect for understanding multi-agent architecture concepts without running live services.- ๐
working-app
: A fully functional, production-ready implementation with Docker, Kubernetes, and monitoring. You are currently viewing this branch.
A production-ready multi-agent system showcasing Agent Communication Protocol (ACP) and Model Context Protocol (MCP) capabilities through a collaborative research workflow.
"Where artificial intelligence meets production-grade architecture"
Project Synapse is a comprehensive multi-agent system built with modern async Python, featuring specialized agents that work together to investigate complex research questions. The system demonstrates advanced patterns in agent communication, secure tool integration, and production deployment practices.
- ๐ Production-Ready: Docker containerization with resource management and health monitoring
- โก High Performance: Async/await architecture with measured performance metrics
- ๐ Security-First: MCP Roots implementation with filesystem access controls
- ๐ Observable: Comprehensive logging and real-time monitoring
- ๐๏ธ Scalable: RabbitMQ message bus with connection pooling
Component | Technology | Performance | Status |
---|---|---|---|
HTTP Servers | FastAPI v0.104.1 | 1,447 RPS file ops | โ Optimized |
Message Bus | RabbitMQ 3.13.7 | 557 RPS API calls | โ High Availability |
Containerization | Docker Compose | <131MB per service | โ Resource Managed |
Agent Coordination | Async Python | 19.8 RPS search ops | โ Production Ready |
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Orchestrator โโโโโบโ Search Agent โโโโโบโ Extraction Agentโ
โ (Coordinator) โ โ (Discovery) โ โ (Processing) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Fact Checker โ โ Synthesis โ โ File Save โ
โ (Validation) โ โ (Generation) โ โ (Storage) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Logger Agent โ
โ (Monitoring) โ
โโโโโโโโโโโโโโโโโโโ
- Docker and Docker Compose
- Git
# Clone the repository
git clone https://github.com/YanCotta/project-synapse.git
cd project-synapse
# Deploy with optimized configuration (includes monitoring)
docker-compose -f docker-compose.optimized.yml up --build
# Monitor system performance
python scripts/monitor_system.py
# Deploy to Kubernetes cluster
./k8s/deploy.sh
# Access monitoring
kubectl port-forward svc/grafana 3000:3000
kubectl port-forward svc/prometheus 9090:9090
# Alternative: Local development
pip install -r requirements.txt
python async_main.py
Metric | Primary Server | Filesystem Server | RabbitMQ |
---|---|---|---|
Response Time | 0.9ms avg | 0.8ms avg | 1.4ms avg |
P95 Latency | 3.5ms | 2.1ms | 2.6ms |
Throughput | 668.4 RPS | 882.7 RPS | 557 RPS |
Success Rate | 100% | 100% | 100% |
- Memory Usage: ~131MB per service (optimized)
- Container Startup: 20-30% faster with optimization
- Connection Efficiency: 40-60% improvement with pooling
- Network Isolation: Custom bridge network (172.20.0.0/16)
- Docker Compose: Multi-service deployment with health checks
- Resource Limits: CPU and memory constraints for production stability
- Health Monitoring: Automated health checks with retry mechanisms
- Network Isolation: Secure service communication
- High Availability: Production-grade message broker
- Connection Pooling: Efficient connection reuse
- Performance Tuning: Memory watermarks and optimization
- Authentication: Secure credential management
- FastAPI Servers: Async HTTP servers with streaming SSE
- Connection Pooling: 50 total connections, 10 per host
- Error Handling: Comprehensive error responses
- Health Endpoints: Service status monitoring
- Filesystem Boundaries: Restricted access to approved directories
- Path Validation: Comprehensive security checks
- Access Logging: Security event monitoring
- Error Handling: Secure error responses
version: '3.8'
services:
rabbitmq:
image: rabbitmq:3.13.7-management
environment:
RABBITMQ_VM_MEMORY_HIGH_WATERMARK: 0.8
deploy:
resources:
limits: { memory: 512M, cpus: "0.5" }
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping"]
interval: 30s
timeout: 10s
retries: 3
- Connection Pooling: 30-second keep-alive with automatic cleanup
- Resource Limits: Memory and CPU constraints
- Health Checks: Automated service monitoring
- Network Optimization: Custom bridge network for isolation
project-synapse/
โโโ src/
โ โโโ agents/ # 7 specialized async agents
โ โ โโโ async_orchestrator.py # Central coordinator
โ โ โโโ async_search_agent.py # Web search capabilities
โ โ โโโ async_extraction_agent.py # Content extraction
โ โ โโโ async_fact_checker_agent.py # Validation services
โ โ โโโ async_synthesis_agent.py # Report generation
โ โ โโโ async_file_save_agent.py # Secure file operations
โ โ โโโ async_logger_agent.py # System monitoring
โ โ โโโ async_base_agent.py # Common agent functionality
โ โโโ mcp_servers/ # Production MCP servers
โ โ โโโ fastapi_primary_server.py # Web tools with progress
โ โ โโโ fastapi_filesystem_server.py # Secure file operations
โ โโโ message_bus/ # RabbitMQ message bus implementation
โ โ โโโ rabbitmq_bus.py # Async message routing
โ โโโ protocols/ # Communication schemas
โ โโโ acp_schema.py # Agent Communication Protocol
โ โโโ mcp_schemas.py # Model Context Protocol
โโโ k8s/ # Kubernetes deployment manifests
โ โโโ configmap.yaml # Environment configuration
โ โโโ rabbitmq-deployment.yaml # RabbitMQ message broker
โ โโโ primary-server-deployment.yaml # Primary MCP server
โ โโโ filesystem-server-deployment.yaml # Filesystem MCP server
โ โโโ agents-deployment.yaml # Agent application
โ โโโ deploy.sh # Deployment automation script
โโโ monitoring/ # Observability and monitoring
โ โโโ prometheus.yml # Prometheus configuration
โ โโโ grafana_dashboard.json # Pre-built Grafana dashboard
โ โโโ grafana-datasources.yml # Grafana data source config
โ โโโ grafana-dashboards.yml # Dashboard provisioning config
โโโ scripts/ # Performance and monitoring tools
โ โโโ performance_test.py # Load testing framework
โ โโโ optimize_performance.py # Performance optimization
โ โโโ monitor_system.py # Real-time monitoring
โ โโโ health_check.py # System health validation
โ โโโ integration_test.py # End-to-end testing
โโโ docs/ # Comprehensive documentation
โ โโโ ARCHITECTURE.md # System architecture guide
โ โโโ ACP_SPEC.md # ACP protocol specification
โ โโโ MCP_IN_DEPTH.md # MCP implementation guide
โโโ docker-compose.optimized.yml # Production deployment
โโโ async_main.py # System entry point
โโโ requirements.txt # Python dependencies
- Agent Communication Protocol (ACP): Custom messaging protocol with type safety
- Model Context Protocol (MCP): Tool integration with progress notifications
- System Architecture: Complete architectural documentation
- Performance Testing: Load testing with baseline metrics
- Resource Management: Memory and CPU optimization
- Health Monitoring: Automated service health checks
- Security: MCP Roots and access control implementation
# Run performance baseline tests
python scripts/performance_test.py
# Monitor system resources
python scripts/monitor_system.py
# Optimize performance settings
python scripts/optimize_performance.py
The system includes comprehensive health monitoring:
- Service Health: HTTP health endpoints for all services
- Message Bus Status: RabbitMQ connection and queue monitoring
- Agent Status: Real-time agent activity tracking
- Resource Usage: Memory and CPU utilization monitoring
The system demonstrates automated research workflows:
- Query Processing: Complex research question analysis
- Web Search: Distributed search across multiple sources
- Content Extraction: Intelligent content processing
- Fact Checking: Automated claim validation
- Report Synthesis: Comprehensive report generation
- Secure Storage: MCP Roots-protected file operations
- Command & Control: Orchestrator coordinating specialized agents
- Peer Review: Fact-checking and validation workflows
- Publish-Subscribe: System-wide event monitoring
- Request-Response: Sophisticated inter-agent communication
- Horizontal Scaling: Multiple worker processes per service
- Resource Isolation: Container-based deployment
- Health Monitoring: Automated failure detection
- Connection Pooling: Efficient resource utilization
- Real-time Metrics: Performance monitoring with baseline comparison
- Health Dashboards: Service status and resource utilization
- Error Tracking: Comprehensive error logging and reporting
- Performance Analytics: Response time and throughput analysis
MIT License - see LICENSE for details.
โ
Production-Ready: Docker containerization with Kubernetes deployment
โ
High Performance: Measured metrics with optimization framework
โ
Secure Architecture: MCP Roots implementation with access controls
โ
Observable Systems: Prometheus metrics and Grafana dashboards
โ
Scalable Design: Async architecture with connection pooling
โ
Complete Documentation: Architecture guides and implementation details
โ
Production Monitoring: Real-time metrics and alerting capabilities
Deploy a production-grade multi-agent system:
# Docker Compose (recommended for development/testing)
docker-compose -f docker-compose.optimized.yml up --build
# Kubernetes (recommended for production)
./k8s/deploy.sh
Experience the power of async agent coordination with comprehensive monitoring and production-grade deployment. ๐ง โจ
๐ PRODUCTION READY - FULLY VALIDATED โ
Project Synapse has successfully completed comprehensive development and QA validation:
- Multi-Agent Architecture: 7 specialized async agents with orchestration
- Production Infrastructure: Docker containerization with Kubernetes support
- Message Bus Integration: High-performance RabbitMQ async communication
- MCP Protocol Implementation: Secure tool integration with progress tracking
- MLOps Monitoring Stack: Prometheus + Grafana observability
- Performance Optimization: Resource limits and connection pooling
- Security Implementation: MCP Roots filesystem access controls
- Comprehensive Documentation: Complete technical specifications
- Repository Cleanup: โ No legacy files or dead code
- System Integration: โ All 6 containers healthy and operational
- End-to-End Workflows: โ Live research workflow completed successfully
- Monitoring Stack: โ Prometheus metrics and Grafana dashboards active
- Performance Metrics: โ Production-grade response times verified
- Workflow Execution: 4-second end-to-end research processing
- Container Performance: <131MB memory per optimized service
- API Response Times: 0.8-0.9ms average latency
- Message Throughput: 557+ RPS through RabbitMQ
- Success Rate: 100% operational reliability
View the complete validation results in our System Validation Report
- ๐๏ธ System Architecture: Complete architectural overview with production infrastructure details
- ๐ก ACP Protocol Specification: Agent Communication Protocol technical specification
- ๐ง MCP Implementation Guide: Model Context Protocol detailed implementation guide
- ๐ Implementation Status: Comprehensive development completion report
- โ System Validation Report: Final QA validation and production readiness certification
- ๐ Educational Simulation Branch: Step-by-step learning implementation with detailed explanations
- ๐ Production Implementation (Current): Fully functional, production-ready system with monitoring