Multi-Runtime AI Agent Setup: Claude Code + Codex + Gemini CLI in One Dashboard
amux is the only open-source control plane that runs Claude Code, OpenAI Codex CLI, and Antigravity CLI (Gemini) simultaneously under a single dashboard — shared kanban board, unified monitoring, and one-tap control from your phone. This guide explains how to configure and run all three. Updated July 2026.
Why Mix Runtimes at All?
If you've been running just Claude Code, you've been leaving significant capacity on the table. Every provider has its own rate limit bucket — which means running agents across Claude, Codex, and Gemini can triple your total throughput without paying more per request. Beyond throughput, each runtime has distinct strengths that map cleanly to different task types.
Most teams don't do this because there's no clean way to manage agents across different CLIs. You end up with three separate terminal windows, three different status-checking workflows, and no shared view of what's done. amux collapses that — all three runtimes register as sessions, pull from the same board, and appear in the same dashboard.
Provider Comparison: Claude vs Codex vs Gemini
| Provider / CLI | Best for | Context window | Cost (approx.) |
|---|---|---|---|
| Claude Code (Anthropic) | Complex reasoning, architecture decisions, open-ended refactors, CLAUDE.md-driven workflows | 200K tokens | Max plan $200/mo unlimited; API $3-15/MTok |
| Codex CLI (OpenAI) | Targeted code generation, test writing, documentation, structured output tasks | 128K tokens | API pricing; GPT-4o ~$2.5-10/MTok |
| Antigravity CLI (Google/Gemini) | Whole-codebase analysis, large migrations, long-context review tasks | 1M tokens | Free tier generous; Gemini 2.0 Flash ~$0.10/MTok |
The key insight: Gemini's 1M-token context window makes it uniquely suited to whole-codebase tasks that would exhaust Claude's or Codex's context. Conversely, Claude's reasoning capabilities make it better for tasks requiring judgment — architectural review, security analysis, complex refactoring decisions. Codex sits in the middle: fast, reliable, and well-suited for mechanical code generation tasks.
Prerequisites & Installation
You need amux installed plus one or more of the AI CLIs. Install what you plan to use:
# amux (required)
git clone https://github.com/mixpeek/amux && cd amux && ./install.sh
# Claude Code (Anthropic)
npm install -g @anthropic-ai/claude-code
# Codex CLI (OpenAI)
npm install -g @openai/codex
# Antigravity CLI (Google's Gemini successor)
# On macOS:
brew install antigravity
# Or via npm:
npm install -g @google/antigravity-cli
Verify each is installed and authenticates correctly before registering sessions in amux:
claude --version # Should show Anthropic Claude Code version
codex --version # Should show OpenAI Codex CLI version
antigravity --version # Should show Antigravity CLI version
Configuring API Keys
Each runtime needs its own API key. The cleanest approach is ~/.amux/server.env — loaded at startup, persists across auto-restarts:
# ~/.amux/server.env
# Anthropic (for Claude Code)
ANTHROPIC_API_KEY=sk-ant-...
# OpenAI (for Codex CLI)
OPENAI_API_KEY=sk-...
# Google / Gemini (for Antigravity CLI)
GEMINI_API_KEY=AIzaSy...
# or:
GOOGLE_API_KEY=AIzaSy...
After creating or editing server.env, trigger a reload:
touch ~/.amux/amux-server.py # triggers auto-restart
Cloud users: If you're on amux cloud, add keys via the BYO key settings panel in the dashboard — ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, and GOOGLE_API_KEY are all whitelisted as of July 2026.
Registering Sessions by Provider
Register sessions the same way regardless of which CLI they use — just set the right command:
# Claude Code sessions
amux register claude-arch --dir ~/Dev/myproject --cmd "claude" --yolo --desc "Architecture + complex reasoning tasks"
amux register claude-review --dir ~/Dev/myproject --cmd "claude" --yolo --desc "Code review + security audit"
# Codex CLI sessions
amux register codex-gen --dir ~/Dev/myproject --cmd "codex" --yolo --desc "Code generation + test writing"
amux register codex-docs --dir ~/Dev/myproject --cmd "codex" --yolo --desc "Documentation + docstrings"
# Antigravity CLI (Gemini) sessions
amux register gemini-scan --dir ~/Dev/myproject --cmd "antigravity" --yolo --desc "Whole-codebase analysis"
Start all of them:
amux start claude-arch
amux start claude-review
amux start codex-gen
amux start codex-docs
amux start gemini-scan
All five sessions now appear in the amux dashboard under their registered names. The dashboard automatically indicates provider type in the session card based on the registered command.
Task Routing by Provider Strength
The simplest routing strategy is to tag tasks in the board description with the target provider, then have each agent's startup prompt filter for its tag. Here's a practical CLAUDE.md snippet for a Claude agent configured to only take "architecture" tasks:
# CLAUDE.md — for Claude Code architecture sessions
## Task Claiming
Only claim tasks tagged [arch] or [review] from the amux board.
Skip tasks tagged [gen], [docs], or [gemini].
Claiming workflow:
1. GET $AMUX_URL/api/board — filter for status=todo AND tag in [arch, review]
2. POST $AMUX_URL/api/board/TASK-ID/claim with your session name
3. Work on the task
4. PATCH $AMUX_URL/api/board/TASK-ID with status=done
A practical task routing matrix for a mixed-provider team:
| Task type | Tag | Best provider | Reason |
|---|---|---|---|
| Architecture decisions | [arch] |
Claude | Best reasoning, understands tradeoffs |
| Security review | [review] |
Claude | Nuanced judgment about vulnerabilities |
| Test generation | [gen] |
Codex | Fast, reliable structured output |
| API endpoint implementation | [gen] |
Codex | Mechanical code generation at speed |
| Docstrings / docs | [docs] |
Codex | Cost-effective for high-volume doc tasks |
| Whole-codebase migration | [gemini] |
Antigravity (Gemini) | 1M context fits entire large codebase |
| Legacy code analysis | [gemini] |
Antigravity (Gemini) | Can ingest entire repo in one pass |
Monitoring a Mixed-Provider Fleet
From the amux dashboard, all sessions appear in the same session list regardless of which runtime they use. The session card shows the registered name and description — which is why descriptive names like claude-arch and codex-gen matter.
The kanban board shows every task with the claiming agent's session name. This makes it trivially visible whether Claude or Codex is working on what. You can filter the board by session name to see only a specific provider's tasks.
From the iOS app: swipe through sessions to check output from any provider. Send messages to any session, check board status, or trigger new tasks — provider-agnostic from your phone.
Rate Limit Distribution Across Providers
This is the practical argument for multi-runtime: you have three separate rate limit buckets. Instead of 30 Claude agents all competing for Anthropic's Tier 4 limits, you can run 15 Claude + 10 Codex + 5 Gemini agents with each provider under its own limit ceiling:
| Provider | Single-provider limit (Tier 4) | Mixed-provider capacity |
|---|---|---|
| Anthropic (Claude Code) | ~60 RPM / 2M TPM | Use for 15-20 agents |
| OpenAI (Codex) | Tier-based; generous at Tier 5 | Add 10-15 more agents |
| Google (Antigravity/Gemini) | 1500 req/day free; paid generous | Add 5-10 long-context agents |
Total effective capacity when mixing: 30-45 agents vs. ~20 on a single provider at the same tier. This is a 2-3× throughput multiplier with no additional cost per request.
Cost Optimization Strategy
Different task types have very different cost profiles. Routing strategically saves significant money at scale:
- Documentation and docstrings: Use Gemini 2.0 Flash (~$0.10/MTok) instead of Claude Sonnet ($3/MTok input). 30× cheaper for mechanical tasks.
- Test generation: Codex (GPT-4o mini ~$0.15/MTok) vs Claude Sonnet. 20× cheaper for structured, mechanical output.
- Architecture and security review: Claude Sonnet or Opus. Worth the premium for tasks requiring real judgment.
- Claude Max plan: If you're running 10+ Claude sessions regularly, the $200/month Max plan ($7/day) is usually cheaper than API pricing above ~5 hours of active agent work per day.
A practical cost comparison for a 30-agent overnight run (8 hours):
| Strategy | Config | Est. cost/night |
|---|---|---|
| All Claude Sonnet (API) | 30 agents × Claude Sonnet API | $80-150 |
| Claude Max + mixed | 15 Claude Max + 10 Codex + 5 Gemini | $200/mo flat + $15-30 |
| Optimized mixed | 10 Claude (complex) + 15 Gemini Flash (docs/tests) + 5 Codex | $20-45 |
FAQ
Can amux run Claude Code, Codex, and Gemini CLI at the same time?
Yes. amux is runtime-agnostic. Any CLI tool registers as a session and gets the same watchdog, board integration, and dashboard visibility. All three major AI coding runtimes are supported as of July 2026, including Antigravity CLI (Google's Gemini successor).
What is Antigravity CLI and how does it relate to Gemini CLI?
Antigravity CLI is Google's successor to the original Gemini CLI — a terminal-based AI coding agent powered by Gemini models. It uses GEMINI_API_KEY or GOOGLE_API_KEY. Both keys are now whitelisted in amux's BYO key settings. The key advantage of Gemini-based agents is the 1M+ token context window.
How do I prevent different providers' agents from working on the same task?
amux's atomic task claiming works the same regardless of provider. POST /api/board/TASK-ID/claim is a SQLite compare-and-swap — only one agent (Claude, Codex, or Gemini) can claim a task in a given instant. Others get 409 and skip to the next task.
Is there a way to route tasks to specific providers automatically?
The recommended pattern is board task tags in the description field (e.g. [arch], [gen], [gemini]) combined with per-session CLAUDE.md files that instruct each agent which tags to claim. This is a simple, runtime-agnostic approach that requires no code changes to amux.
Run your AI engineering team from one dashboard
amux is the open-source control plane for running Claude Code, Codex, and Gemini CLI agents together — shared kanban, self-healing watchdog, iOS app. Single Python file, zero dependencies, MIT licensed.
git clone https://github.com/mixpeek/amux && cd amux && ./install.sh
# Register Claude + Codex + Gemini sessions
amux register claude-1 --cmd "claude" --yolo
amux register codex-1 --cmd "codex" --yolo
amux register gemini-1 --cmd "antigravity" --yolo
amux serve # → https://localhost:8822
View on GitHub
Scaling to 50+ agents →
Related guides: Scaling to 50+ Agents · Running AI Agents Overnight · Self-Healing Configuration · amux vs Codex CLI · YOLO Mode Setup