Note: This repository contains two primary branches:
- 🌳
 educational-simulation: A "pseudo-code" simulation with detailed documentation, perfect for understanding the architectural concepts of ACP, A2A, and MCP without needing to run a live application.- 🚀
 working-app: A fully functional, asynchronous version of the system using FastAPI, RabbitMQ, and asyncio. Explore this branch for a real-world implementation.
A comprehensive engineering blueprint showcasing Agent Communication Protocol (ACP), Agent-to-Agent (A2A), and Model Context Protocol (MCP) capabilities through a collaborative research swarm.
"Where artificial intelligence meets elegant architecture"
✅ COMPLETE - All implementation phases finished with comprehensive documentation
| Component | Status | Description | 
|---|---|---|
| 🏗️ Project Structure | ✅ Complete | Full directory structure with organized modules | 
| 📋 Protocol Definitions | ✅ Complete | ACP & MCP schemas with Pydantic validation | 
| 🔧 MCP Servers | ✅ Complete | 3 servers demonstrating all MCP capabilities | 
| 🤖 Agent Swarm | ✅ Complete | 7 specialized agents with unique communication patterns | 
| 🚀 Main Orchestration | ✅ Complete | Full workflow automation and monitoring | 
| 📚 Documentation | ✅ Complete | In-depth technical documentation and guides | 
- ✅ Structured Messaging: Type-safe communication with Pydantic validation
 - ✅ Direct & Broadcast: Both A2A direct messages and pub/sub topic broadcasts
 - ✅ Workflow Coordination: Complex multi-agent research workflows
 - ✅ Error Handling: Comprehensive error reporting and recovery mechanisms
 
- ✅ Command & Control: Orchestrator coordinating specialized worker agents
 - ✅ Peer Review: FactChecker agent providing validation services to peers
 - ✅ Pub/Sub Broadcasting: Logger agent monitoring system-wide activity
 - ✅ Request-Response: Sophisticated interaction patterns between agents
 
- ✅ Progress Notifications: Real-time progress reporting during long operations
 - ✅ MCP Roots Security: Filesystem access restricted to approved directories
 - ✅ MCP Sampling: AI-assisted text generation with role reversal patterns
 - ✅ Tool Integration: Secure, observable tool access for agents
 
┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│  Orchestrator   │◄──►│  Search Agent   │◄──►│ Extraction Agent│
│  (Coordinator)  │    │  (Discovery)    │    │  (Processing)   │
└─────────────────┘    └─────────────────┘    └─────────────────┘
         │                       │                       │
         ▼                       ▼                       ▼
┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│ Fact Checker    │    │  Synthesis      │    │  File Save      │
│ (Validation)    │    │  (Generation)   │    │  (Secure I/O)   │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │
                                ▼
                       ┌─────────────────┐
                       │  Logger Agent   │
                       │  (Monitoring)   │
                       └─────────────────┘
| Server | Purpose | Tools | Demonstrates | 
|---|---|---|---|
| Primary Tooling | Web operations | search_web, browse_and_extract | 
Progress Notifications | 
| Filesystem | Secure file I/O | save_file | 
MCP Roots Security | 
| User Interaction | AI assistance | rephrase_sentence | 
MCP Sampling | 
- Python 3.8+
 - Required dependencies in 
requirements.txt 
# Clone and setup
git clone https://github.com/YanCotta/project-synapse.git
cd project-synapse
pip install -r requirements.txt
# Run the demonstration
python main.pyThe system will automatically:
- 🔧 Initialize Infrastructure: Start all MCP servers with security boundaries
 - 🤖 Launch Agent Swarm: Boot 7 specialized agents with distinct roles
 - 🔬 Execute Research Workflow: Investigate "What is the impact of quantum computing on cryptography?"
 - 📊 Monitor Progress: Real-time logging and progress tracking
 - 📝 Generate Report: Synthesized research report saved securely to 
output/reports/ 
project-synapse/
├── 📁 src/
│   ├── 📁 agents/              # 7 specialized agents
│   │   ├── 🎯 orchestrator.py      # Central coordinator
│   │   ├── 🔍 search_agent.py      # Web search capabilities  
│   │   ├── 📄 extraction_agent.py   # Content extraction
│   │   ├── ✅ fact_checker_agent.py # Claim validation
│   │   ├── ✍️ synthesis_agent.py    # Report generation
│   │   ├── 💾 file_save_agent.py    # Secure file operations
│   │   ├── 📊 logger_agent.py       # System monitoring
│   │   └── 🧩 base_agent.py         # Common agent functionality
│   ├── 📁 mcp_servers/         # MCP server implementations
│   │   ├── 🌐 primary_server.py     # Web tools with progress
│   │   ├── 🔒 filesystem_server.py  # Secure file ops
│   │   └── 🎨 user_interaction.py   # AI sampling demos
│   └── 📁 protocols/           # Communication schemas
│       ├── 📡 acp_schema.py         # Agent Communication Protocol
│       └── 🔧 mcp_schemas.py        # Model Context Protocol
├── 📁 docs/                   # Comprehensive documentation
│   ├── 🏛️ ARCHITECTURE.md          # System architecture guide
│   ├── 📡 ACP_SPEC.md               # ACP protocol specification  
│   └── 🔧 MCP_IN_DEPTH.md          # MCP implementation guide
├── 📁 output/                 # Generated content
│   ├── 📁 reports/            # Research reports (MCP Roots secured)
│   └── 📁 data/               # Extracted data
├── 🚀 main.py                 # System entry point
├── 📋 requirements.txt        # Python dependencies
└── 📖 README.md              # This file
Project Synapse serves as both a working system and an educational resource demonstrating:
- Workflow Coordination: How agents collaborate on complex tasks
 - Role Specialization: Each agent has a distinct purpose and communication style
 - Error Handling: Robust error reporting and recovery mechanisms
 - System Monitoring: Comprehensive observability and logging
 
- Type Safety: Pydantic models ensuring message validation
 - Routing Mechanisms: Both direct and broadcast communication patterns
 - Security Models: MCP Roots preventing unauthorized file access
 - Progress Reporting: Real-time feedback for long-running operations
 
- Separation of Concerns: Clear boundaries between agents, protocols, and tools
 - Extensibility: Easy to add new agents, tools, and communication patterns
 - Testability: Modular design enabling component-level testing
 - Documentation: Comprehensive guides for understanding and extending
 
Explore our custom messaging protocol that enables type-safe, structured communication between agents with support for both direct messaging and publish-subscribe patterns.
📖 Read the ACP Specification →
Discover how we implement MCP's advanced features including progress notifications, security boundaries, and AI sampling patterns.
Understand the complete system design, from agent threading models to security architectures and scalability considerations.
📖 Read the Architecture Guide →
When you run python main.py, you'll witness:
[MCP Progress] Connecting to URL... (10%)
[MCP Progress] Downloading content... (30%)  
[MCP Progress] Parsing HTML structure... (60%)
[MCP Progress] Extracting main content... (80%)
[MCP Progress] Extraction complete (100%)
[FileSystemServer] SECURITY VIOLATION: Access denied: 
'/etc/passwd' is outside allowed roots.
Allowed roots: ['/output/reports', '/output/data']
[Orchestrator] Assigned search task task_a1b2c3d4 to SearchAgent
[SearchAgent] Web search completed: found 3 results
[ExtractionAgent] Starting content extraction from: https://example.com
[SynthesisAgent] Report synthesized: 1,247 words, 3 sources  
[Logger] System health check: healthy - 7 active components
[Logger] Research workflow completed successfully
class CustomAgent(BaseAgent, MCPClientMixin):
    def handle_message(self, message: ACPMessage):
        # Implement custom message handling
        passdef custom_tool(self, params: CustomParams) -> Dict:
    # Implement tool logic with progress reporting
    mcp_context.report_progress("Processing...", 50)
    return {"result": "success"}class CustomPayload(BaseModel):
    custom_field: str
    options: Dict[str, Any]While Project Synapse is complete as an educational demonstration, potential enhancements include:
- 🌐 Distributed Deployment: Move from single-process to distributed agent deployment
 - ⚡ Async Processing: Implement async/await patterns for improved concurrency
 - 🔄 StreamableHTTP: Upgrade from stdio-like to HTTP-based MCP transport
 - 📈 Metrics & Monitoring: Integration with Prometheus/Grafana
 - 🧪 Testing Framework: Comprehensive unit and integration test suite
 - 🔌 Plugin System: Dynamic agent and tool loading capabilities
 
Project Synapse is designed as an educational reference implementation. While it's feature-complete for its intended purpose, we welcome:
- 📝 Documentation improvements
 - 🐛 Bug reports and fixes
 - 💡 Enhancement suggestions
 - 📚 Educational use cases and examples
 
MIT License - see LICENSE for details.
Project Synapse demonstrates that sophisticated multi-agent systems can be built with:
- 🏗️ Clear Architecture: Well-defined separation between communication, coordination, and tool execution
 - 🔒 Security First: MCP Roots ensuring agents cannot access unauthorized resources
 - 👀 Full Observability: Comprehensive logging and monitoring of all system interactions
 - 🚀 Real Scalability: Patterns that extend from demo to production environments
 - 📖 Complete Documentation: Every component explained with examples and best practices
 
Ready to explore the future of multi-agent systems?
python main.pyWatch as seven specialized agents collaborate to research quantum computing's impact on cryptography, demonstrating the power of ACP, A2A, and MCP protocols in action. 🧠✨ A collaborative research swarm in order to educationally showcase (and for me to gain more experience on) ACP, MCP and A2A