aid

Multi-AI CLI Team Orchestrator

Multi-AI CLI team orchestrator that dispatches work to gemini, codex, opencode, cursor, kilo, and custom agents with judge, peer-review, experiment loops, and a local web dashboard.

curl -fsSL https://aid.agent-tools.org/install.sh | sh
v8.78.0 5 built-in agents 32 commands ~3.4 MB binary MIT
⚠️
Security Notice: aid orchestrates multiple AI agents with broad file system and shell access. It is still in active research and testing. We recommend running aid on a dedicated development machine or VM rather than your primary device. Review agent output before merging, and use --dry-run / --read-only to limit risk.

Why aid?

Unified Interface

One CLI for gemini, codex, opencode, cursor, kilo, and custom agents. Same flags and workflow across all of them.

Progress Visibility

Watch background tasks in real time with aid watch, the TUI, or the local web dashboard.

Cost Tracking

Per-agent usage, budgets, and spend windows. Set limits and run low-value work with --budget.

Git-Native Isolation

Per-task worktrees, auto-merge, and escape detection. Parallel work without polluting the main branch.

Quality Gates

--judge, --peer-review, and --best-of let you auto-review, score, and compare agent outputs.

Features

Experiment Loop NEW

Autonomous edit-measure-keep/revert cycles. Optimize any metric across iterations with aid experiment run.

Judge & Peer Review NEW

--judge auto-reviews output, --peer-review sends to another agent for scored (1-10) critique.

Agent Cascade NEW

--cascade opencode,codex,cursor auto-retries with the next agent on failure. No manual retry needed.

Best-of-N NEW

Dispatch the same task to N agents, run quality metrics, and keep the best result.

Web Dashboard v8.15

Local web UI for live task monitoring, agent status, and workgroup overview.

Batch DAG

Run TOML batch files with dependency scheduling, parallel execution, concurrency limits, and conditional chains.

Auto Selection

Let aid pick the best agent for the task from capability scores and history.

Agent Memory

Project-scoped discoveries, conventions, and lessons auto-injected into agent prompts.

Custom Agents

Define agents in ~/.aid/agents/ so any CLI or wrapper can join the orchestrator.

TUI Dashboard

aid watch --tui for live progress, stats view, and task timeline.

Teams v8.4

Role-based agent groups with knowledge context, behavioral rules, and capability overrides via --team.

Project Profiles v8.5

Per-repo .aid/project.toml with hobby/standard/production presets for verify, budget, and rules.

Smart Knowledge Injection v8.5

Stop-word filtering, cross-layer dedup, and relevance scoring keep agent prompts lean and focused.

Security Hardening v8.16

Input sanitization, worktree sandbox guards, shell injection prevention, and path traversal protection.

Process Safety v8.17

Batch resilience, process group management, on_done child reaping, idle timeout, and double-dispatch prevention.

Data Integrity v8.20

Subprocess concurrency limits, --dir agent isolation via GIT_CEILING_DIRECTORIES, zero production unwrap().

Claude Code Agent v8.69

Claude Code as a first-class agent with auto-selection support, streaming output, and full orchestration integration.

Copilot Agent v8.75

GitHub Copilot CLI as a built-in agent with setup, selection, pricing, sandbox, and usage integration.

Knowledge Graph v8.72

Tiered memory injection, compact prompt format, and knowledge graph CLI for richer agent context.

Batch Progress v8.78

Real-time progress visibility in quiet batch mode, smarter concurrency limits, and isolated best-of-N output paths.

Quota Cascade v8.7

When an agent hits its rate limit, aid auto-falls back to the next capable agent in the chain.

Merge Approval v8.9

aid merge --approve for interactive Merge/Retry/Skip decisions via hiboss before merging.

Live Task Control v8.3

aid stop / aid stop --force for termination, aid steer for mid-flight guidance injection.

Agent Store

Browse and install community agents from the GitHub-backed store with version pinning.

Claude Code Hook v8.11

aid hook session-start integrates with Claude Code's SessionStart lifecycle for automatic context injection.

Dry Run & Read-Only

--dry-run previews dispatch without running. --read-only prevents file writes for safe research tasks.

Commands

CommandPurposeExample
runDispatch task with --judge, --peer-review, --cascade, --best-of, --timeout, --read-only, --dry-run, plus bg/verify/worktree/context/scope/skill flags.aid run codex "Refactor auth" --verify --judge --cascade opencode,cursor
batchRun TOML batch files with DAG scheduling. Subcommands: init (template), retry (re-dispatch failures).aid batch tasks.toml --parallel --max-concurrent 3
experimentAutonomous experiment loop: edit, measure, keep/revert. Optimize any metric across iterations.aid experiment run codex "Optimize parser" --metric "cargo bench" --max-runs 5
benchmarkCompare the same task across multiple agents.aid benchmark --agents codex,cursor "Implement parsing"
watchFollow live progress in text, quiet, or TUI mode.aid watch --tui
boardList tracked tasks with filters and zombie detection.aid board --today
completionsPrint the most recent completion notifications.aid completions
showInspect task summary, diff, output, log, or AI explanation.aid show t-1234 --diff
usageView task history, per-agent analytics, and budget windows.aid usage --agent codex --period 7d
retryRe-dispatch a failed task with feedback, optionally switching agent or dir.aid retry t-1234 -f "Fix the error" --agent opencode
respondSend interactive input to a running background task.aid respond t-1234 "Rerun with logging"
stopStop a running task. Graceful by default, --force for immediate SIGKILL.aid stop t-1234 --force
steerInject guidance into a running PTY task mid-flight.aid steer t-1234 "Switch to approach B"
outputShow task output directly without additional metadata.aid output t-1234
askQuick research or exploration task.aid ask "How does retry work in this repo?"
mcpStart the stdio MCP server for Claude Code or other MCP clients.aid mcp
mergeMark done tasks as merged. --group for bulk, --approve for interactive approval.aid merge --group wg-a3f1 --approve
cleanRemove old tasks, orphaned worktrees, and logs.aid clean --days 30
agentManage custom agent definitions: list, show, add, remove, fork.aid agent fork codex --as codex-fast
configInspect agents, skills, pricing, templates, and prompt token budget.aid config pricing --update
worktreeManage worktree lifecycle (create/list/remove).aid worktree create --dir feat/parser
groupWorkgroup management: create, list, show, update, delete, summary, finding, broadcast.aid group summary wg-a3f1
storeBrowse, install (with version pinning), and update community agent packages.aid store install sunoj/aider
upgradeUpgrade aid to latest version from crates.io.aid upgrade
memoryManage project-scoped agent memory (discoveries, conventions, lessons, facts).aid memory add discovery "Auth uses bcrypt"
exportExport a task with full context in markdown or JSON.aid export t-1234 --format json
treeShow retry chain as an ASCII tree.aid tree t-1234
queryFast LLM query via OpenRouter (no agent startup). Free and auto tiers.aid query "question"
setupInteractive setup wizard. Detects agents, sets API keys, initializes skills.aid setup
teamManage teams with knowledge context, rules, and agent preferences.aid team list
projectPer-repo project profiles (.aid/project.toml) with built-in presets.aid project init
hookClaude Code lifecycle hooks for aid context injection.aid hook session-start

Agents

Each agent wraps a different AI CLI. aid run auto picks the best fit based on task type, model capability, cost, and rate limits. Define custom agents in ~/.aid/agents/.

gemini

Researcher

Research, web search, fact-checking, documentation

flash (default), pro, flash-liteFree – $10/M

codex

Builder

Complex implementation, multi-file refactors, test suites

gpt-5.4, gpt-4.1, gpt-4.1-mini, gpt-4.1-nano$0.10 – $15/M

opencode

Editor

Simple edits, renames, type fixes, quick patches

glm-4.7, kimi-k2.5, mimo-free, nemotron-free, minimax-freeFree – $2/M

kilo

Budget Editor

Simple edits and renames (free tier)

default (free)Free

cursor

Frontend + General

Frontend/UI, general coding, strong model routing

auto, composer-1.5, opus-4.6-thinking, gpt-5.4-high$20/mo subscription

Architecture

┌─────────────────────────────────────┐
│           aid (CLI binary)          │
├──────┬──────┬──────┬───────┬────────┬───────────┤
│ run  │ watch│ show │ board │ usage  │experiment │  ← commands
├──────┴──────┴──────┴───────┴────────┤
│           Task Manager              │
│  ┌────────┐ ┌────────┐ ┌────────┐  │
│  │Classif.│ │ Watch  │ │ Store  │  │
│  │+ Agent │ │ Engine │ │(SQLite)│  │
│  │Registry│ │        │ │        │  │
│  └────┬───┘ └────┬───┘ └────┬───┘  │
│       │          │          │       │
├───────┴──────────┴──────────┴───────┤
│         Agent Adapters              │
│  ┌──────┐ ┌─────┐ ┌────────┐ ┌──────┐ ┌────┐
│  │Gemini│ │Codex│ │OpenCode│ │Cursor│ │Kilo│
│  └──────┘ └─────┘ └────────┘ └──────┘ └────┘
└─────────────────────────────────────┘

Quick Start

Install aid. No Rust toolchain required — pre-compiled binaries for macOS and Linux.

curl -fsSL https://aid.agent-tools.org/install.sh | sh

Run aid setup to configure API keys and detect installed agents.

aid setup

Set up your project profile and dispatch tasks.

aid project init aid run codex "Add unit tests" --verify --judge aid watch --tui