A powerful orchestration system that enables multiple AI coding assistants (Claude Code, Codex, Copilot CLI, Gemini CLI) to collaborate on software development tasks.
This project provides a wrapper CLI that coordinates multiple AI agents to work together on coding tasks:
- Implementation: Codex implements the initial solution
- Review: Gemini reviews code for SOLID principles, best practices, and design patterns
- Refinement: Claude implements feedback and improvements
- Iteration: The process continues as needed until the task is complete
- 🤝 Multi-Agent Collaboration: Coordinate multiple AI coding assistants
- 💬 Interactive Shell: REPL-style interface with multi-round conversations (like Claude Code & Codex CLIs)
- 📝 Conversation History: Context preservation across interactions
- 💾 Session Management: Save and load conversation sessions
- 🔧 Extensible Architecture: Easy to add new AI agents
- ⚙️ Configurable Workflows: Define custom collaboration patterns
- 📊 Detailed Logging: Track agent interactions and decisions
- 🧪 Comprehensive Testing: Ensure reliable agent communication
- 🎯 Smart Orchestration: Intelligent task routing and feedback loops
┌─────────────────────────────────────────────┐
│ AI Orchestrator CLI │
│ (User Interface & Workflow Management) │
└─────────────────┬───────────────────────────┘
│
┌─────────┴─────────┐
│ Orchestrator │
│ Core Engine │
└─────────┬─────────┘
│
┌─────────────┼─────────────┬─────────────┐
│ │ │ │
┌───▼───┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│ Codex │ │ Gemini │ │ Claude │ │ Copilot │
│Adapter│ │ Adapter │ │ Adapter │ │ Adapter │
└───┬───┘ └────┬────┘ └────┬────┘ └────┬────┘
│ │ │ │
┌───▼───┐ ┌────▼────┐ ┌────▼────┐ ┌────▼────┐
│Codex │ │Gemini │ │Claude │ │Copilot │
│CLI │ │CLI │ │Code │ │CLI │
└───────┘ └─────────┘ └─────────┘ └─────────┘
- Python 3.8+
- AI CLI tools installed and authenticated:
- Claude Code
- OpenAI Codex CLI
- GitHub Copilot CLI
- Google Gemini CLI
# Clone the repository
git clone <repository-url>
cd AI-Coding-Tools-Collaborative
# Install dependencies
pip install -r requirements.txt
# Make the CLI executable
chmod +x ai-orchestrator
# Optional: Add to PATH
ln -s $(pwd)/ai-orchestrator /usr/local/bin/ai-orchestratorCreate or modify config/agents.yaml to configure your AI agents:
agents:
codex:
enabled: true
command: "codex"
role: "implementation"
gemini:
enabled: true
command: "gemini-cli"
role: "review"
claude:
enabled: true
command: "claude"
role: "refinement"
copilot:
enabled: false
command: "github-copilot-cli"
role: "suggestions"
workflows:
default:
- agent: "codex"
task: "implement"
- agent: "gemini"
task: "review"
- agent: "claude"
task: "refine"Start an interactive shell for multi-round conversations, similar to Claude Code and Codex CLIs:
# Start interactive shell
./ai-orchestrator shell
# Start with specific workflow
./ai-orchestrator shell --workflow thoroughInteractive features:
- Multi-round conversations with context preservation
- Switch between agents on-the-fly
- Save and load conversation sessions
- Full readline support (arrow keys, command history, tab completion)
- Shell commands for control (/help, /switch, /save, etc.)
See Interactive Shell Guide for detailed documentation.
Example interactive session:
orchestrator (default) > Create a user authentication module with JWT
✓ Task completed successfully!
orchestrator (default) > Add password reset functionality
✓ Task completed successfully!
orchestrator (default) > /save auth-module
Session saved!
orchestrator (default) > /exit
For single, non-interactive tasks:
# Run with default workflow
./ai-orchestrator run "Create a REST API with user authentication"
# Specify a custom workflow
./ai-orchestrator run "Implement a binary search tree" --workflow thorough
# Dry run to see the execution plan
./ai-orchestrator run "Add error handling to the payment service" --dry-run
# Verbose mode for detailed logging
./ai-orchestrator run "Refactor the database layer" --verbose# Set maximum iterations
./ai-orchestrator run "Implement and test a caching layer" --max-iterations 5
# Output to specific directory
./ai-orchestrator run "Generate a CLI tool" --output ./output
# Custom configuration
./ai-orchestrator run "Task description" --config ./my-config.yaml./ai-orchestrator run "Create a user authentication module with JWT tokens"Process:
- Codex implements the authentication module
- Gemini reviews for SOLID principles, security best practices
- Claude implements Gemini's feedback
- Process repeats if needed
./ai-orchestrator run "Review this code" --workflow review-onlyProcess:
- Gemini reviews existing code
- Claude implements improvements
./ai-orchestrator shell
> Create a task queue system
> Add priority support
> Add worker pool management
> Write tests for the task queue
> /save task-queue-projectProcess: Multi-round conversation with context preservation, allowing iterative refinement
AI-Coding-Tools-Collaborative/
├── ai-orchestrator # Main CLI entry point
├── orchestrator/
│ ├── __init__.py
│ ├── core.py # Core orchestration logic
│ ├── workflow.py # Workflow management
│ ├── task_manager.py # Task distribution
│ └── shell.py # Interactive shell/REPL
├── adapters/
│ ├── __init__.py
│ ├── base.py # Base adapter interface
│ ├── cli_communicator.py # Robust CLI communication
│ ├── claude_adapter.py # Claude Code adapter
│ ├── codex_adapter.py # Codex adapter
│ ├── gemini_adapter.py # Gemini adapter
│ └── copilot_adapter.py # Copilot adapter
├── config/
│ └── agents.yaml # Agent and workflow configuration
├── tests/
│ ├── __init__.py
│ ├── test_adapters.py # Adapter tests
│ ├── test_orchestrator.py # Orchestrator tests
│ ├── test_integration.py # End-to-end tests
│ └── test_shell.py # Interactive shell tests
├── docs/
│ ├── architecture.md # Architecture details
│ ├── interactive-shell.md # Interactive shell guide
│ ├── adding-agents.md # Guide for adding new agents
│ └── workflows.md # Workflow configuration guide
├── examples/
│ └── sample_tasks.md # Example tasks and outputs
├── requirements.txt
└── README.md
# Run all tests
python -m pytest tests/
# Run specific test suite
python -m pytest tests/test_adapters.py -v
# Run with coverage
python -m pytest --cov=orchestrator --cov=adapters tests/
# Integration tests
python -m pytest tests/test_integration.py --integrationThe orchestrator receives a task from the user via the CLI.
Based on configuration or flags, the appropriate workflow is selected.
Agents are invoked in sequence according to the workflow:
- Implementation Agent (Codex): Creates initial code
- Review Agent (Gemini): Analyzes code for:
- SOLID principles
- Design patterns
- Best practices
- Performance issues
- Security vulnerabilities
- Refinement Agent (Claude): Implements feedback
The process continues until:
- Quality thresholds are met
- Maximum iterations reached
- No more feedback is generated
Final code and collaboration logs are provided to the user.
See docs/adding-agents.md for detailed instructions.
Basic steps:
- Create adapter in
adapters/ - Implement
BaseAdapterinterface - Add configuration in
config/agents.yaml - Add tests in
tests/
Contributions are welcome! Please see our contributing guidelines.
See LICENSE.md for details.
Ensure the CLI tool is installed and in your PATH:
which claude
which codex
which gemini-cli
which github-copilot-cliMake sure you're logged in to each service:
claude auth login
codex auth login
gemini-cli auth login
github-copilot-cli auth loginValidate your configuration:
./ai-orchestrator --validate-configQ: Can I use only some of the agents?
A: Yes! Configure which agents are enabled in config/agents.yaml.
Q: How do I create custom workflows?
A: Edit config/workflows.yaml to define your own collaboration patterns.
Q: Is internet connection required? A: Yes, all AI agents require internet to function.
Q: Can I run this in CI/CD?
A: Yes! Use the --non-interactive flag for automation.
For issues, questions, or contributions:
- Open an issue on GitHub
- Check the documentation in
docs/ - Review example tasks in
examples/