/ao — Composio Agent Orchestrator
Wraps the ao CLI (@composio/ao). Spawns parallel agents across projects with git worktree isolation.
When activated:
Check if ao CLI is available:
which ao
If not found, display:
ao CLI not installed.
Run: npm i -g @composio/ao
Then re-invoke /ao once installed.
If found, check the version:
ao --version
Then present via AskUserQuestion:
| Option | What it does |
|---|---|
| Spawn agents on current project (Recommended) | Ask: how many, what tasks, model selection |
| Spawn from config file | Read agent-orchestrator.yaml, show configured projects |
| Check running agents | Run ao status — show active sessions |
| Stop agents | Run ao stop — kill running sessions |
| Something else | Free text |
Spawn Flow
When user picks "Spawn agents on current project":
Ask number of agents via AskUserQuestion:
- 2 agents
- 3 agents
- 5 agents
- Custom number
Ask model via AskUserQuestion:
- Claude (Recommended)
- Codex
- Aider
- OpenCode
Ask task assignment strategy via AskUserQuestion:
- One shared task (agents collaborate on the same goal)
- One task per agent (assign a separate task to each agent)
- Auto-split from description (describe overall goal, split automatically)
Collect task(s) — one per agent if individual, or one overall goal if auto-split.
Run the spawn command:
ao spawn --agents [n] --model [model] --task "[task]" --worktreeShow spawned summary:
ao spawn complete Agents: [n] | Model: [model] | Worktree: isolated Task(s): Agent 1: [task] Agent 2: [task] ...
Spawn from Config File
When user picks "Spawn from config file":
Check for config:
ls agent-orchestrator.yaml 2>/dev/null || ls .ao/config.yaml 2>/dev/nullIf found, read and display the configured projects and agents.
Ask which project/config to run via AskUserQuestion.
Run:
ao spawn --config [config_file]
Check Running Agents
ao status
Display the output formatted as a table. If no agents running: "No active ao sessions."
Stop Agents
ao stop
Confirm first: "This will kill all running ao sessions. Proceed?"
If user confirms, run the command and report result.
After every action, suggest next steps via AskUserQuestion:
| Option | Description |
|---|---|
| Check agent status | Run ao status to see progress |
| Spawn more agents | Add agents to the current run |
| View worktrees | git worktree list to see isolation state |
| Merge a worktree | Bring completed agent work back to main branch |
| Stop all agents | ao stop |
| Back to main menu | Return to /cc or top-level menu |
| Something else | Free text |
Worktree Merge Helper
When user picks "Merge a worktree":
List worktrees:
git worktree listAsk which worktree to merge via AskUserQuestion.
Show the diff summary:
git diff main...[worktree_branch] --statAsk: "Merge via PR or direct merge?"
- Create PR → run
gh pr createwith relevant context - Direct merge → confirm then
git merge [branch]
- Create PR → run
After merge, offer to prune the worktree:
git worktree remove [path]