| name | agent-orchestrator-parallel-coding |
| description | Orchestrate parallel AI coding agents across git worktrees for autonomous CI fixes, code reviews, and PR management |
| triggers | ["set up agent orchestrator for parallel coding","spawn multiple AI agents to work on different issues","configure autonomous CI failure handling","create isolated git worktrees for parallel agents","automate code review responses with AI agents","orchestrate multi-agent coding tasks","manage fleet of coding agents with reactions","run parallel AI agents on different branches"] |
Agent Orchestrator — Parallel AI Coding Agents
Skill by ara.so — AI Agent Skills collection.
Agent Orchestrator is an agentic orchestration layer that spawns parallel AI coding agents, each in its own git worktree. Agents autonomously fix CI failures, address review comments, and open PRs while you supervise from a unified dashboard.
Core Concepts
- Orchestrator Agent: Plans tasks, spawns worker agents, monitors progress
- Worker Agents: Isolated agents working on individual issues/features
- Git Worktrees: Each agent gets its own filesystem workspace
- Reactions: Automated responses to CI failures, review comments, approvals
- Plugin Architecture: Extensible runtime, agent, workspace, tracker, SCM, notifier, terminal plugins
Installation
Global CLI Installation
npm install -g @aoagents/ao
For nightly builds from main:
npm install -g @aoagents/ao@nightly
From Source (Contributors)
git clone https://github.com/ComposioHQ/agent-orchestrator.git
cd agent-orchestrator
bash scripts/setup.sh
Prerequisites
- Node.js 20+
- Git 2.25+ (worktree support)
gh CLI (authenticated)
- macOS/Linux: tmux (
brew install tmux or sudo apt install tmux)
- Windows: PowerShell 7+ (uses native ConPTY, no tmux needed)
Quick Start
Start from GitHub URL
ao start https://github.com/your-org/your-repo
Start from Local Repo
cd ~/your-project
ao start
Start Multiple Projects
ao start ~/path/to/project-one
ao start https://github.com/org/project-two
The dashboard opens at http://localhost:3000 by default.
Configuration
On first run, ao start generates agent-orchestrator.yaml:
$schema: https://raw.githubusercontent.com/ComposioHQ/agent-orchestrator/main/schema/config.schema.json
port: 3000
defaults:
runtime: tmux
agent: claude-code
workspace: worktree
notifiers: [desktop]
projects:
my-app:
repo: owner/my-app
path: ~/my-app
defaultBranch: main
sessionPrefix: app
reactions:
ci-failed:
auto: true
action: send-to-agent
retries: 2
changes-requested:
auto: true
action: send-to-agent
escalateAfter: 30m
approved-and-green:
auto: false
action: notify
power:
preventIdleSleep: true
Multi-Project Configuration
projects:
frontend:
repo: org/frontend
path: ~/work/frontend
defaultBranch: main
sessionPrefix: fe
backend:
repo: org/backend
path: ~/work/backend
defaultBranch: develop
sessionPrefix: be
docs:
repo: org/documentation
path: ~/work/docs
defaultBranch: main
sessionPrefix: docs
CLI Commands
Session Management
ao list
ao new "Fix login validation bug" --project my-app --issue 123
ao attach my-app-fix-login
ao stop my-app-fix-login
ao stop --project my-app --all
Project Management
ao add-project ~/path/to/repo
ao remove-project my-app
ao config-help
Status & Monitoring
ao status
ao status my-app-fix-login
ao logs my-app-fix-login
Zsh Completion
mkdir -p ~/.zsh/completions
ao completion zsh > ~/.zsh/completions/_ao
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit
compinit
Plugin Configuration
Runtime Plugins
defaults:
runtime: tmux
tmux (default on macOS/Linux):
- Persistent sessions
- Attach from multiple terminals
- Scrollback history
process (default on Windows):
- Native ConPTY support
- No tmux dependency
- Set
AO_SHELL=bash for Git Bash
docker:
- Complete isolation
- Reproducible environments
Agent Plugins
defaults:
agent: claude-code
Each agent plugin implements the AgentPlugin interface:
export interface AgentPlugin {
name: string;
start(config: AgentConfig): Promise<void>;
stop(sessionId: string): Promise<void>;
sendMessage(sessionId: string, message: string): Promise<void>;
getStatus(sessionId: string): Promise<AgentStatus>;
}
Workspace Plugins
defaults:
workspace: worktree
worktree: Single repo, multiple working directories (recommended)
clone: Full repository clone per session
Tracker Plugins
defaults:
tracker: github
Integration with issue tracking systems to fetch context and update status.
Notifier Plugins
defaults:
notifiers: [desktop, slack]
Multiple notifiers can be active simultaneously.
Reaction Patterns
Auto-Fix CI Failures
reactions:
ci-failed:
auto: true
action: send-to-agent
retries: 2
message: "CI failed with the following errors: {{errors}}"
When CI fails, the orchestrator sends logs to the agent automatically. After 2 retries, escalation occurs.
Auto-Address Review Comments
reactions:
changes-requested:
auto: true
action: send-to-agent
escalateAfter: 30m
message: "Reviewer requested: {{comments}}"
The agent gets review comments and attempts to address them. If not resolved in 30 minutes, you're notified.
Auto-Merge on Approval
reactions:
approved-and-green:
auto: true
action: merge
strategy: squash
deleteAfter: true
When PR is approved and CI passes, automatically merge and delete the branch.
Custom Reactions
reactions:
label-added:
auto: true
condition: "label == 'needs-tests'"
action: send-to-agent
message: "Please add tests for this change"
Working with Sessions
Creating a Session Programmatically
import { SessionManager } from '@aoagents/core';
const manager = new SessionManager();
const session = await manager.create({
projectId: 'my-app',
name: 'fix-auth-bug',
issue: 'GH-456',
branch: 'fix/auth-validation',
agent: 'claude-code',
runtime: 'tmux',
workspace: 'worktree'
});
console.log(`Session ${session.id} started at ${session.workspacePath}`);
Sending Messages to Agent
ao send my-app-fix-auth "Review the authentication flow in src/auth.ts"
ao api POST /sessions/my-app-fix-auth/message -d '{"content":"Check the auth flow"}'
Monitoring Session Status
import { SessionManager } from '@aoagents/core';
const manager = new SessionManager();
const status = await manager.getStatus('my-app-fix-auth');
console.log(`Agent: ${status.agent}`);
console.log(`State: ${status.state}`);
console.log(`Current task: ${status.currentTask}`);
console.log(`Branch: ${status.branch}`);
console.log(`Workspace: ${status.workspacePath}`);
Git Worktree Management
Agent Orchestrator uses git worktrees to isolate agents:
~/my-app/.worktrees/fix-auth-bug/
Worktree Cleanup
ao stop my-app-fix-auth
cd ~/my-app
git worktree remove .worktrees/fix-auth-bug
git branch -D fix/auth-validation
Dashboard API
The orchestrator exposes a REST API (default port 3000):
List Sessions
curl http://localhost:3000/api/sessions
Create Session
curl -X POST http://localhost:3000/api/sessions \
-H "Content-Type: application/json" \
-d '{
"projectId": "my-app",
"issue": "GH-789",
"title": "Add user export feature"
}'
Get Session Status
curl http://localhost:3000/api/sessions/my-app-export/status
Send Message
curl -X POST http://localhost:3000/api/sessions/my-app-export/message \
-H "Content-Type: application/json" \
-d '{"content": "Export to CSV format"}'
Stop Session
curl -X DELETE http://localhost:3000/api/sessions/my-app-export
Building Plugins
Agent Plugin Example
import { AgentPlugin, AgentConfig, AgentStatus } from '@aoagents/core';
export class CustomAgentPlugin implements AgentPlugin {
name = 'custom-agent';
async start(config: AgentConfig): Promise<void> {
const { workspacePath, sessionId, task } = config;
}
async stop(sessionId: string): Promise<void> {
}
async sendMessage(sessionId: string, message: string): Promise<void> {
}
async getStatus(sessionId: string): Promise<AgentStatus> {
return {
state: ,
: ,
: ()
};
}
}
{
: ()
};
Notifier Plugin Example
import { NotifierPlugin, Notification } from '@aoagents/core';
export class TelegramNotifierPlugin implements NotifierPlugin {
name = 'telegram';
constructor(private botToken: string, private chatId: string) {}
async notify(notification: Notification): Promise<void> {
const { title, message, level, sessionId } = notification;
const text = `*${title}*\n${message}\nSession: ${sessionId}`;
await fetch(`https://api.telegram.org/bot${this.botToken}/sendMessage`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
chat_id: this.chatId,
text,
parse_mode: 'Markdown'
})
});
}
}
{
: (
process..!,
process..!
)
};
Environment Variables
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
export GITHUB_TOKEN=ghp_...
export SLACK_WEBHOOK_URL=https://hooks.slack.com/...
export DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
export AO_SHELL=bash
export AO_CONFIG=~/custom/agent-orchestrator.yaml
Troubleshooting
Worktree Already Exists
git worktree remove .worktrees/session-name --force
git branch -D branch-name
tmux Not Found (macOS/Linux)
brew install tmux
sudo apt install tmux
ao config set defaults.runtime process
Agent Not Responding
ao logs session-name
ao status session-name
ao stop session-name
ao new "Same task" --project my-app --issue 123
Port Already in Use
port: 3001
GitHub Auth Issues
gh auth login
gh auth status
Merge Conflicts in Worktree
ao attach session-name
Best Practices
- One issue per session: Each agent works on a single, well-defined task
- Use worktrees: Better isolation and performance than clones
- Configure reactions: Automate CI fixes and review responses
- Monitor dashboard: Track progress across all agents
- Escalate complex decisions: Let agents handle routine, you handle judgment calls
- Clean up regularly: Remove merged branches and completed worktrees
- Test reactions: Start with
auto: false, validate behavior, then enable
- Use session prefixes: Organize sessions by project for clarity
Remote Access
power:
preventIdleSleep: true
Access dashboard remotely via Tailscale or VPN:
http://your-mac-tailscale-ip:3000
Note: Lid-close sleep cannot be prevented on macOS. Use clamshell mode (external display + power) for lid-closed access.
Development & Testing
git clone https://github.com/ComposioHQ/agent-orchestrator.git
cd agent-orchestrator
pnpm install
pnpm build
pnpm test
pnpm dev
cd packages/plugin-agent-custom
pnpm build
Advanced: Custom Orchestrator Agent
Create a custom orchestrator that uses different planning logic:
import { OrchestratorAgent, Task, SessionManager } from '@aoagents/core';
class CustomOrchestrator extends OrchestratorAgent {
async plan(goal: string): Promise<Task[]> {
const tasks = await this.breakdownGoal(goal);
return tasks.map(task => ({
id: this.generateId(),
title: task.title,
description: task.description,
dependencies: task.deps,
estimatedEffort: task.effort
}));
}
async spawn(task: Task): Promise<string> {
const manager = new SessionManager();
const session = await manager.create({
projectId: .,
: .(task.),
: task.,
: .(task.),
: .(task),
: ,
:
});
session.;
}
}
This skill covers the complete usage of Agent Orchestrator for spawning and managing parallel AI coding agents with autonomous reactions, git worktree isolation, and extensible plugin architecture.