{"id":32023586,"url":"https://github.com/krokozyab/agent-fusion","last_synced_at":"2025-10-16T09:53:19.831Z","repository":{"id":318737489,"uuid":"1070257295","full_name":"krokozyab/Agent-Fusion","owner":"krokozyab","description":"Multi-agent AI orchestrator enabling Claude Code, Codex CLI, Amazon Q Developer, and Gemini Code Assist to collaborate through consensus-based decision making via MCP","archived":false,"fork":false,"pushed_at":"2025-10-12T16:35:38.000Z","size":81415,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T14:05:11.068Z","etag":null,"topics":["agent","ai","aws-q","claude","claude-code","codex","collaboration","consensus-algorithm","gemini","integration","mcp","multiagent","orchestrator"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krokozyab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T15:28:34.000Z","updated_at":"2025-10-14T06:37:56.000Z","dependencies_parsed_at":"2025-10-14T14:05:29.553Z","dependency_job_id":"4b77699c-d5f4-4a5b-b32b-195c681a581f","html_url":"https://github.com/krokozyab/Agent-Fusion","commit_stats":null,"previous_names":["krokozyab/agent-fusion"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/krokozyab/Agent-Fusion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krokozyab%2FAgent-Fusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krokozyab%2FAgent-Fusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krokozyab%2FAgent-Fusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krokozyab%2FAgent-Fusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krokozyab","download_url":"https://codeload.github.com/krokozyab/Agent-Fusion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krokozyab%2FAgent-Fusion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279175125,"owners_count":26119391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-16T02:00:06.019Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","aws-q","claude","claude-code","codex","collaboration","consensus-algorithm","gemini","integration","mcp","multiagent","orchestrator"],"created_at":"2025-10-16T09:53:16.192Z","updated_at":"2025-10-16T09:53:19.821Z","avatar_url":"https://github.com/krokozyab.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Fusion\n\nA multi-agent orchestration system that enables Claude Code, Codex CLI, Amazon Q Developer, and Gemini Code Assist to collaborate bidirectionally through intelligent task routing and consensus-based decision making.\n\n## Architecture Overview\n\n### Core Concept\n\nThe system enables multiple AI agents (Claude Code, Codex CLI, Amazon Q Developer, Gemini Code Assist) to collaborate on complex tasks through a central MCP (Model Context Protocol) server that maintains shared context and orchestrates their interactions.\n\n```\n┌──────────────┐  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐\n│              │  │              │  │              │  │              │\n│ Claude Code  │  │  Codex CLI   │  │  Amazon Q    │  │   Gemini     │\n│  (Agent 1)   │  │  (Agent 2)   │  │  (Agent 3)   │  │  (Agent 4)   │\n│              │  │              │  │              │  │              │\n└──────┬───────┘  └──────┬───────┘  └──────┬───────┘  └──────┬───────┘\n       │                 │                 │                 │\n       │     MCP Client Connections (bidirectional)          │\n       │                 │                 │                 │\n       └─────────────────┼─────────────────┼─────────────────┘\n                         ▼                 ▼\n    ┌─────────────────────────────────────────────────────────────┐\n    │                                                             │\n    │                 MCP Orchestrator Server                     │\n    │                                                             │\n    │  ┌───────────────────────────────────────────────────────┐  │\n    │  │         Shared Context \u0026 Task Queue                   │  │\n    │  │  • Task routing \u0026 assignment                          │  │\n    │  │  • Proposals \u0026 consensus voting                       │  │\n    │  │  • Multi-agent conversation history                   │  │\n    │  └───────────────────────────────────────────────────────┘  │\n    │                                                             │\n    │  ┌───────────────────────────────────────────────────────┐  │\n    │  │          Persistent Storage (DuckDB)                  │  │\n    │  │  • Tasks, Proposals, Decisions                        │  │\n    │  │  • Agent metrics \u0026 performance                        │  │\n    │  │  • Context snapshots                                  │  │\n    │  └───────────────────────────────────────────────────────┘  │\n    │                                                             │\n    └─────────────────────────────────────────────────────────────┘\n```\n\n### How It Works\n\n1. **Agents Connect**: Multiple AI agents (Claude Code, Codex CLI, Amazon Q Developer, Gemini Code Assist) connect to the MCP server as clients\n2. **Task Creation**: Any agent can create tasks (simple, consensus, or assigned)\n3. **Context Sharing**: The server maintains shared context visible to all agents\n4. **Collaboration**: Agents submit proposals, vote on solutions, and review each other's work\n5. **Routing**: Intelligent routing decides whether tasks need single-agent or multi-agent collaboration\n\n**Key Benefits:**\n- **Multi-Agent Support**: Works with Claude Code, Codex CLI, Amazon Q Developer, and Gemini Code Assist\n- **Bidirectional**: All agents can initiate tasks and respond to each other\n- **Context Preservation**: Full conversation history and task context maintained centrally\n- **Flexible Workflows**: Supports solo, consensus, sequential, and parallel execution modes\n\n## Features\n\n🎥 **[Watch Demo Video](https://youtu.be/kXkTh0fJ0Lc)** - See consensus collaboration in action\n\n### What Makes This Unique\n\n- **True Bidirectional Collaboration**: All agents can initiate tasks, respond to each other, and manage workflows - not just sequential handoffs\n- **Multi-Agent Support**: Works with Claude Code, Codex CLI, Amazon Q Developer, and Gemini Code Assist\n- **Consensus-Based Decision Making**: Multiple agents propose solutions and vote on the best approach for critical architectural and security decisions\n- **Intelligent Task Routing**: Automatically analyzes task complexity and risk to select optimal execution approach - supports solo execution for simple tasks and multi-agent consensus for critical decisions\n- **Persistent Task Queue**: Agents check pending work assigned to them, enabling asynchronous collaboration across sessions\n- **Flexible Workflow Control**: Supports solo execution, multi-agent consensus, direct assignments, and emergency bypass modes\n- **Event-Driven Architecture**: Async event bus enables decoupled, scalable component communication\n\n## Installation\n\n**No API keys required** - All agents (Claude Code, Codex CLI, Amazon Q Developer, Gemini Code Assist) run using your existing local installations and connect via MCP.\n\nSee [Installation Guide](docs/INSTALL.md) for setup instructions for all supported agents.\n\n## Getting Started\n\n### Agent Configuration\n\nFor optimal collaboration, it's **highly recommended** to provide the [Agent Orchestrator Instructions](docs/AGENT_ORCHESTRATOR_INSTRUCTIONS.md) to your AI agents before starting work. This enables agents to:\n\n- Understand how to create and manage tasks\n- Detect user routing directives from natural language\n- Follow proper handoff workflows between agents\n- Use MCP tools correctly for collaboration\n\n**Recommended approach:**\n\nIn your first message to the agent, say:\n```\n\"Read and follow the instructions in docs/AGENT_ORCHESTRATOR_INSTRUCTIONS.md\"\n```\n\nOr include the content as context at the start of your session.\n\n### Usage Examples\n\nFor detailed workflow examples, see [Conversation Handoff Workflow](docs/CONVERSATION_HANDOFF_WORKFLOW.md).\n\n## MCP Server Endpoints\n\n### Health Check\n```\nGET /healthz\n```\n\n### Tools\n```\nGET /mcp/tools              # List available tools\nPOST /mcp/tools/call        # Invoke a tool\n```\n\n**Available Tools:**\n- `create_simple_task` - Create a single-agent task\n- `create_consensus_task` - Create a multi-agent consensus task\n- `assign_task` - Assign task to specific agent\n- `continue_task` - Load task context for continuation\n- `respond_to_task` - Load task context and submit response in one operation (recommended)\n- `complete_task` - Mark task as completed\n- `get_pending_tasks` - Get pending tasks for an agent\n- `get_task_status` - Get task status\n- `submit_input` - Submit agent input/proposal\n\n## Project Structure\n\n- `src/main/kotlin/com/orchestrator/`\n  - `Main.kt` - Application entry point\n  - `config/` - Configuration loading\n  - `core/` - Core components (AgentRegistry, EventBus)\n  - `domain/` - Domain models (Task, Agent, Proposal, Decision)\n  - `modules/` - Feature modules (routing, consensus, metrics, MCP)\n  - `storage/` - Database and repositories\n  - `utils/` - Utilities (Logger, IdGenerator)\n- `src/test/kotlin` - Tests\n- `config/` - Configuration files\n- `build.gradle.kts` - Gradle build script\n\n\n\n## Architecture\n\n📊 **[View Sequence Diagrams](docs/SEQUENCE_DIAGRAMS.md)** - Detailed workflow visualizations showing task flow from creation to completion\n\n### Core Components\n\n- **Routing Module**: Classifies tasks and selects optimal routing strategy\n  - SOLO: Single agent execution\n  - CONSENSUS: Multiple agents collaborate\n  - SEQUENTIAL: Agents work in sequence\n  - PARALLEL: Agents work in parallel\n\n- **Consensus Module**: Coordinates multi-agent collaboration\n  - Voting Strategy: Democratic voting\n  - Reasoning Quality: Best reasoning wins\n  - Token Optimization: Minimize token usage\n\n- **Metrics Module**: Comprehensive tracking\n  - Token usage per task/agent\n  - Performance monitoring\n  - Decision analytics\n  - Alert system\n\n- **MCP Server**: HTTP-based tool interface\n  - RESTful endpoints\n  - JSON request/response\n  - Error handling\n\n- **Event Bus**: Async communication\n  - Pub/sub pattern\n  - Event-driven architecture\n  - Decoupled components\n\n- **Storage**: DuckDB persistence\n  - Tasks, proposals, decisions\n  - Metrics time series\n  - Context snapshots\n\n### Routing Strategies\n\nThe system supports four routing strategies that are automatically determined based on task characteristics:\n\n| Strategy | When Used | Agents | Use Case |\n|----------|-----------|--------|----------|\n| SOLO | Low complexity/risk | 1 | Simple tasks, documentation |\n| CONSENSUS | High risk, critical | 2+ | Architecture, security decisions |\n| SEQUENTIAL | High complexity | 2+ | Planning, multi-phase projects |\n| PARALLEL | Research/testing, divisible tasks | 2+ | Code generation, data analysis |\n\n**Note**: Agents create tasks using `create_simple_task` (SOLO) or `create_consensus_task` (CONSENSUS). The routing module can automatically select SEQUENTIAL or PARALLEL strategies based on complexity, risk, task type, and natural language signals (e.g., \"parallel\", \"concurrent\").\n\n### Agent Directives\n\nAgents automatically detect routing signals from natural language. For complete directive documentation, see [Agent Orchestrator Instructions](docs/AGENT_ORCHESTRATOR_INSTRUCTIONS.md#directive-reference).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrokozyab%2Fagent-fusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrokozyab%2Fagent-fusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrokozyab%2Fagent-fusion/lists"}