agent-orchestrator-parallel-coding

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Orchestrator — Parallel AI Coding Agents

Agent Orchestrator — 并行AI编码Agent

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.
ara.so提供的Skill — AI Agent技能合集。
Agent Orchestrator是一个智能编排层,可生成并行AI编码Agent,每个Agent都运行在独立的Git工作树中。Agent可自主修复CI失败问题、处理评审意见并创建PR,而你只需通过统一仪表盘进行监控。

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
  • 编排Agent:规划任务、生成工作Agent、监控进度
  • 工作Agent:独立处理单个问题/功能的Agent
  • Git工作树:每个Agent拥有独立的文件系统工作区
  • 响应机制:针对CI失败、评审意见、审批的自动化响应
  • 插件架构:可扩展的运行时、Agent、工作区、追踪器、SCM、通知器、终端插件

Installation

安装

Global CLI Installation

全局CLI安装

bash
npm install -g @aoagents/ao
For nightly builds from main:
bash
npm install -g @aoagents/ao@nightly
bash
npm install -g @aoagents/ao
从main分支安装夜间构建版本:
bash
npm install -g @aoagents/ao@nightly

From Source (Contributors)

从源码安装(贡献者)

bash
git clone https://github.com/ComposioHQ/agent-orchestrator.git
cd agent-orchestrator
bash scripts/setup.sh
bash
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)
  • Node.js 20+
  • Git 2.25+(支持工作树功能)
  • gh
    CLI(已完成认证)
  • macOS/Linux:tmux(通过
    brew install tmux
    sudo apt install tmux
    安装)
  • Windows:PowerShell 7+(使用原生ConPTY,无需tmux)

Quick Start

快速开始

Start from GitHub URL

从GitHub URL启动

bash
ao start https://github.com/your-org/your-repo
bash
ao start https://github.com/your-org/your-repo

Start from Local Repo

从本地仓库启动

bash
cd ~/your-project
ao start
bash
cd ~/your-project
ao start

Start Multiple Projects

启动多个项目

bash
ao start ~/path/to/project-one
ao start https://github.com/org/project-two
The dashboard opens at
http://localhost:3000
by default.
bash
ao start ~/path/to/project-one
ao start https://github.com/org/project-two
仪表盘默认在
http://localhost:3000
打开。

Configuration

配置

On first run,
ao start
generates
agent-orchestrator.yaml
:
yaml
$schema: https://raw.githubusercontent.com/ComposioHQ/agent-orchestrator/main/schema/config.schema.json
port: 3000

defaults:
  runtime: tmux       # tmux on macOS/Linux, process on Windows
  agent: claude-code  # or codex, aider, cursor, opencode, kimicode
  workspace: worktree # or clone
  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  # Set to true for auto-merge
    action: notify

power:
  preventIdleSleep: true  # Keeps Mac awake for remote access
首次运行
ao start
时,会生成
agent-orchestrator.yaml
文件:
yaml
$schema: https://raw.githubusercontent.com/ComposioHQ/agent-orchestrator/main/schema/config.schema.json
port: 3000

defaults:
  runtime: tmux       # macOS/Linux使用tmux,Windows使用process
  agent: claude-code  # 也可选择codex、aider、cursor、opencode、kimicode
  workspace: worktree # 也可选择clone
  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  # 设置为true可启用自动合并
    action: notify

power:
  preventIdleSleep: true  # 保持Mac唤醒以支持远程访问

Multi-Project Configuration

多项目配置

yaml
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
yaml
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

CLI命令

Session Management

会话管理

bash
undefined
bash
undefined

List all active sessions

列出所有活跃会话

ao list
ao list

Start a new agent session

启动新的Agent会话

ao new "Fix login validation bug" --project my-app --issue 123
ao new "Fix login validation bug" --project my-app --issue 123

Attach to existing session

连接到现有会话

ao attach my-app-fix-login
ao attach my-app-fix-login

Stop a session

停止会话

ao stop my-app-fix-login
ao stop my-app-fix-login

Stop all sessions for a project

停止某个项目的所有会话

ao stop --project my-app --all
undefined
ao stop --project my-app --all
undefined

Project Management

项目管理

bash
undefined
bash
undefined

Add project

添加项目

ao add-project ~/path/to/repo
ao add-project ~/path/to/repo

Remove project

删除项目

ao remove-project my-app
ao remove-project my-app

Show configuration

查看配置帮助

ao config-help
undefined
ao config-help
undefined

Status & Monitoring

状态与监控

bash
undefined
bash
undefined

Show all sessions and their status

查看所有会话及其状态

ao status
ao status

Show detailed session info

查看会话详细信息

ao status my-app-fix-login
ao status my-app-fix-login

View logs

查看日志

ao logs my-app-fix-login
undefined
ao logs my-app-fix-login
undefined

Zsh Completion

Zsh补全

bash
undefined
bash
undefined

Generate completion file

生成补全文件

mkdir -p ~/.zsh/completions ao completion zsh > ~/.zsh/completions/_ao
mkdir -p ~/.zsh/completions ao completion zsh > ~/.zsh/completions/_ao

Add to ~/.zshrc before compinit

在~/.zshrc的compinit之前添加以下内容

fpath=(~/.zsh/completions $fpath) autoload -Uz compinit compinit
undefined
fpath=(~/.zsh/completions $fpath) autoload -Uz compinit compinit
undefined

Plugin Configuration

插件配置

Runtime Plugins

运行时插件

yaml
defaults:
  runtime: tmux  # or process, docker
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
yaml
defaults:
  runtime: tmux  # 也可选择process、docker
tmux(macOS/Linux默认):
  • 持久化会话
  • 支持从多个终端连接
  • 滚动历史记录
process(Windows默认):
  • 原生ConPTY支持
  • 无需依赖tmux
  • 设置
    AO_SHELL=bash
    可使用Git Bash
docker
  • 完全隔离环境
  • 可重现的运行环境

Agent Plugins

Agent插件

yaml
defaults:
  agent: claude-code  # or codex, aider, cursor, opencode, kimicode
Each agent plugin implements the
AgentPlugin
interface:
typescript
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>;
}
yaml
defaults:
  agent: claude-code  # 也可选择codex、aider、cursor、opencode、kimicode
每个Agent插件都实现了
AgentPlugin
接口:
typescript
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

工作区插件

yaml
defaults:
  workspace: worktree  # or clone
worktree: Single repo, multiple working directories (recommended) clone: Full repository clone per session
yaml
defaults:
  workspace: worktree  # 也可选择clone
worktree:单个仓库,多个工作目录(推荐) clone:每个会话完整克隆仓库

Tracker Plugins

追踪器插件

yaml
defaults:
  tracker: github  # or linear, gitlab
Integration with issue tracking systems to fetch context and update status.
yaml
defaults:
  tracker: github  # 也可选择linear、gitlab
与问题追踪系统集成,用于获取上下文并更新状态。

Notifier Plugins

通知器插件

yaml
defaults:
  notifiers: [desktop, slack]  # Available: desktop, slack, discord, composio, webhook, openclaw
Multiple notifiers can be active simultaneously.
yaml
defaults:
  notifiers: [desktop, slack]  # 可选:desktop、slack、discord、composio、webhook、openclaw
可同时启用多个通知器。

Reaction Patterns

响应模式

Auto-Fix CI Failures

自动修复CI失败

yaml
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.
yaml
reactions:
  ci-failed:
    auto: true
    action: send-to-agent
    retries: 2
    message: "CI failed with the following errors: {{errors}}"
当CI失败时,编排器会自动将日志发送给Agent。重试2次后会触发升级流程。

Auto-Address Review Comments

自动处理评审意见

yaml
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.
yaml
reactions:
  changes-requested:
    auto: true
    action: send-to-agent
    escalateAfter: 30m
    message: "Reviewer requested: {{comments}}"
Agent会收到评审意见并尝试处理。如果30分钟内未解决,会通知你。

Auto-Merge on Approval

审批后自动合并

yaml
reactions:
  approved-and-green:
    auto: true  # Enable auto-merge
    action: merge
    strategy: squash  # or merge, rebase
    deleteAfter: true
When PR is approved and CI passes, automatically merge and delete the branch.
yaml
reactions:
  approved-and-green:
    auto: true  # 启用自动合并
    action: merge
    strategy: squash  # 也可选择merge、rebase
    deleteAfter: true
当PR获得审批且CI通过时,自动合并并删除分支。

Custom Reactions

自定义响应

yaml
reactions:
  label-added:
    auto: true
    condition: "label == 'needs-tests'"
    action: send-to-agent
    message: "Please add tests for this change"
yaml
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

编程式创建会话

typescript
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'
});

// Session is now running in isolated worktree
console.log(`Session ${session.id} started at ${session.workspacePath}`);
typescript
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

向Agent发送消息

bash
undefined
bash
undefined

Via CLI

通过CLI发送

ao send my-app-fix-auth "Review the authentication flow in src/auth.ts"
ao send my-app-fix-auth "Review the authentication flow in src/auth.ts"

Via API

通过API发送

ao api POST /sessions/my-app-fix-auth/message -d '{"content":"Check the auth flow"}'
undefined
ao api POST /sessions/my-app-fix-auth/message -d '{"content":"Check the auth flow"}'
undefined

Monitoring Session Status

监控会话状态

typescript
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}`);  // idle, working, waiting, error
console.log(`Current task: ${status.currentTask}`);
console.log(`Branch: ${status.branch}`);
console.log(`Workspace: ${status.workspacePath}`);
typescript
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}`);  // idle、working、waiting、error
console.log(`Current task: ${status.currentTask}`);
console.log(`Branch: ${status.branch}`);
console.log(`Workspace: ${status.workspacePath}`);

Git Worktree Management

Git工作树管理

Agent Orchestrator uses git worktrees to isolate agents:
bash
undefined
Agent Orchestrator使用Git工作树实现Agent隔离:
bash
undefined

Worktrees are automatically created under:

工作树会自动创建在以下路径:

~/my-app/.worktrees/fix-auth-bug/
~/my-app/.worktrees/fix-auth-bug/

Each worktree has its own:

每个工作树拥有独立的:

- Working directory

- 工作目录

- HEAD pointer

- HEAD指针

- Index

- 索引

- Branch

- 分支

undefined
undefined

Worktree Cleanup

工作树清理

bash
undefined
bash
undefined

Cleanup happens automatically on session stop

会话停止时会自动清理

ao stop my-app-fix-auth
ao stop my-app-fix-auth

Manual cleanup if needed

必要时手动清理

cd ~/my-app git worktree remove .worktrees/fix-auth-bug git branch -D fix/auth-validation
undefined
cd ~/my-app git worktree remove .worktrees/fix-auth-bug git branch -D fix/auth-validation
undefined

Dashboard API

仪表盘API

The orchestrator exposes a REST API (default port 3000):
编排器暴露REST API(默认端口3000):

List Sessions

列出会话

bash
curl http://localhost:3000/api/sessions
bash
curl http://localhost:3000/api/sessions

Create Session

创建会话

bash
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"
  }'
bash
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

获取会话状态

bash
curl http://localhost:3000/api/sessions/my-app-export/status
bash
curl http://localhost:3000/api/sessions/my-app-export/status

Send Message

发送消息

bash
curl -X POST http://localhost:3000/api/sessions/my-app-export/message \
  -H "Content-Type: application/json" \
  -d '{"content": "Export to CSV format"}'
bash
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

停止会话

bash
curl -X DELETE http://localhost:3000/api/sessions/my-app-export
bash
curl -X DELETE http://localhost:3000/api/sessions/my-app-export

Building Plugins

插件开发

Agent Plugin Example

Agent插件示例

typescript
// plugins/agent-custom/src/index.ts
import { AgentPlugin, AgentConfig, AgentStatus } from '@aoagents/core';

export class CustomAgentPlugin implements AgentPlugin {
  name = 'custom-agent';
  
  async start(config: AgentConfig): Promise<void> {
    // Initialize agent in workspace
    const { workspacePath, sessionId, task } = config;
    
    // Launch agent process
    // Set up communication channel
    // Return when ready
  }
  
  async stop(sessionId: string): Promise<void> {
    // Cleanup agent process
    // Save state if needed
  }
  
  async sendMessage(sessionId: string, message: string): Promise<void> {
    // Forward message to agent
  }
  
  async getStatus(sessionId: string): Promise<AgentStatus> {
    return {
      state: 'working',
      currentTask: 'Analyzing codebase',
      lastActivity: new Date()
    };
  }
}

export default {
  agent: new CustomAgentPlugin()
};
typescript
// plugins/agent-custom/src/index.ts
import { AgentPlugin, AgentConfig, AgentStatus } from '@aoagents/core';

export class CustomAgentPlugin implements AgentPlugin {
  name = 'custom-agent';
  
  async start(config: AgentConfig): Promise<void> {
    // 在工作区初始化Agent
    const { workspacePath, sessionId, task } = config;
    
    // 启动Agent进程
    // 设置通信通道
    // 准备就绪后返回
  }
  
  async stop(sessionId: string): Promise<void> {
    // 清理Agent进程
    // 必要时保存状态
  }
  
  async sendMessage(sessionId: string, message: string): Promise<void> {
    // 将消息转发给Agent
  }
  
  async getStatus(sessionId: string): Promise<AgentStatus> {
    return {
      state: 'working',
      currentTask: 'Analyzing codebase',
      lastActivity: new Date()
    };
  }
}

export default {
  agent: new CustomAgentPlugin()
};

Notifier Plugin Example

通知器插件示例

typescript
// plugins/notifier-telegram/src/index.ts
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'
      })
    });
  }
}

export default {
  notifier: new TelegramNotifierPlugin(
    process.env.TELEGRAM_BOT_TOKEN!,
    process.env.TELEGRAM_CHAT_ID!
  )
};
typescript
// plugins/notifier-telegram/src/index.ts
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'
      })
    });
  }
}

export default {
  notifier: new TelegramNotifierPlugin(
    process.env.TELEGRAM_BOT_TOKEN!,
    process.env.TELEGRAM_CHAT_ID!
  )
};

Environment Variables

环境变量

bash
undefined
bash
undefined

Agent credentials

Agent凭证

export ANTHROPIC_API_KEY=sk-ant-... export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-... export OPENAI_API_KEY=sk-...

GitHub integration

GitHub集成

export GITHUB_TOKEN=ghp_...
export GITHUB_TOKEN=ghp_...

Notifier credentials

通知器凭证

export SLACK_WEBHOOK_URL=https://hooks.slack.com/... export DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...
export SLACK_WEBHOOK_URL=https://hooks.slack.com/... export DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/...

Windows shell preference

Windows shell偏好

export AO_SHELL=bash # Use Git Bash instead of PowerShell
export AO_SHELL=bash # 使用Git Bash替代PowerShell

Custom config location

自定义配置路径

export AO_CONFIG=~/custom/agent-orchestrator.yaml
undefined
export AO_CONFIG=~/custom/agent-orchestrator.yaml
undefined

Troubleshooting

故障排查

Worktree Already Exists

工作树已存在

bash
undefined
bash
undefined

Error: worktree already exists

错误:worktree already exists

Solution: Clean up manually

解决方案:手动清理

git worktree remove .worktrees/session-name --force git branch -D branch-name
undefined
git worktree remove .worktrees/session-name --force git branch -D branch-name
undefined

tmux Not Found (macOS/Linux)

未找到tmux(macOS/Linux)

bash
undefined
bash
undefined

Install tmux

安装tmux

brew install tmux # macOS sudo apt install tmux # Ubuntu/Debian
brew install tmux # macOS sudo apt install tmux # Ubuntu/Debian

Or switch to process runtime

或切换到process运行时

ao config set defaults.runtime process
undefined
ao config set defaults.runtime process
undefined

Agent Not Responding

Agent无响应

bash
undefined
bash
undefined

Check session logs

查看会话日志

ao logs session-name
ao logs session-name

Check agent process

查看Agent进程状态

ao status session-name
ao status session-name

Restart session

重启会话

ao stop session-name ao new "Same task" --project my-app --issue 123
undefined
ao stop session-name ao new "Same task" --project my-app --issue 123
undefined

Port Already in Use

端口已被占用

yaml
undefined
yaml
undefined

agent-orchestrator.yaml

agent-orchestrator.yaml

port: 3001 # Change from default 3000
undefined
port: 3001 # 从默认3000修改为其他端口
undefined

GitHub Auth Issues

GitHub认证问题

bash
undefined
bash
undefined

Re-authenticate gh CLI

重新认证gh CLI

gh auth login
gh auth login

Verify token has required scopes

验证令牌是否具备所需权限

gh auth status
undefined
gh auth status
undefined

Merge Conflicts in Worktree

工作树中存在合并冲突

bash
undefined
bash
undefined

Agent handles automatically via reaction

Agent会通过响应机制自动处理

Or attach and resolve manually

或手动连接到会话解决冲突

ao attach session-name
ao attach session-name

Inside session: resolve conflicts, commit, push

在会话内:解决冲突、提交、推送

undefined
undefined

Best Practices

最佳实践

  1. One issue per session: Each agent works on a single, well-defined task
  2. Use worktrees: Better isolation and performance than clones
  3. Configure reactions: Automate CI fixes and review responses
  4. Monitor dashboard: Track progress across all agents
  5. Escalate complex decisions: Let agents handle routine, you handle judgment calls
  6. Clean up regularly: Remove merged branches and completed worktrees
  7. Test reactions: Start with
    auto: false
    , validate behavior, then enable
  8. Use session prefixes: Organize sessions by project for clarity
  1. 单会话单任务:每个Agent专注于单个明确的任务
  2. 使用工作树:相比克隆,提供更好的隔离性和性能
  3. 配置响应机制:自动化CI修复和评审意见处理
  4. 监控仪表盘:追踪所有Agent的进度
  5. 复杂决策升级:让Agent处理常规任务,你负责判断类决策
  6. 定期清理:移除已合并的分支和已完成的工作树
  7. 测试响应机制:先设置
    auto: false
    验证行为,再启用自动模式
  8. 使用会话前缀:按项目组织会话,提升清晰度

Remote Access

远程访问

yaml
undefined
yaml
undefined

Keep Mac awake for remote dashboard access

保持Mac唤醒以支持远程仪表盘访问

power: preventIdleSleep: true # Default on macOS

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.
power: preventIdleSleep: true # macOS默认启用

通过Tailscale或VPN远程访问仪表盘:
- `http://your-mac-tailscale-ip:3000`

**注意**:macOS无法阻止合盖睡眠。如需合盖访问,请使用扩展坞模式(外接显示器+电源)。

Development & Testing

开发与测试

bash
undefined
bash
undefined

Clone and build

克隆并构建

git clone https://github.com/ComposioHQ/agent-orchestrator.git cd agent-orchestrator pnpm install pnpm build
git clone https://github.com/ComposioHQ/agent-orchestrator.git cd agent-orchestrator pnpm install pnpm build

Run tests (3,288 test cases)

运行测试(共3288个测试用例)

pnpm test
pnpm test

Start dev server

启动开发服务器

pnpm dev
pnpm dev

Build plugins

构建插件

cd packages/plugin-agent-custom pnpm build
undefined
cd packages/plugin-agent-custom pnpm build
undefined

Advanced: Custom Orchestrator Agent

进阶:自定义编排Agent

Create a custom orchestrator that uses different planning logic:
typescript
// orchestrator-custom.ts
import { OrchestratorAgent, Task, SessionManager } from '@aoagents/core';

class CustomOrchestrator extends OrchestratorAgent {
  async plan(goal: string): Promise<Task[]> {
    // Custom planning logic
    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: this.projectId,
      name: this.toSessionName(task.title),
      issue: task.id,
      branch: this.toBranchName(task.title),
      agent: this.selectAgent(task),
      runtime: 'tmux',
      workspace: 'worktree'
    });
    
    return session.id;
  }
}
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.
创建使用不同规划逻辑的自定义编排器:
typescript
// orchestrator-custom.ts
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: this.projectId,
      name: this.toSessionName(task.title),
      issue: task.id,
      branch: this.toBranchName(task.title),
      agent: this.selectAgent(task),
      runtime: 'tmux',
      workspace: 'worktree'
    });
    
    return session.id;
  }
}
本Skill涵盖了Agent Orchestrator的完整使用方法,包括生成和管理并行AI编码Agent、自动化响应、Git工作树隔离以及可扩展插件架构。