Agent Teams API
Saved rosters for launching or reusing local Claude Code and Codex CLI sessions.
Presets
List Presets
GET /api/v1/agent-teams/presetsReturns saved team presets and their slots.
Get Preset
GET /api/v1/agent-teams/presets/{preset_id}Returns one saved team preset with its slots.
Create Preset
POST /api/v1/agent-teams/presets{
"name": "Release validation",
"description": "Agents used to validate a release branch",
"slots": [
{
"provider": "codex-cli",
"repo_path": "/home/user/repo",
"display_name": "Reviewer",
"role": "planner-reviewer",
"charter": "Review the plan and implementation against release goals.",
"enabled": true
}
]
}Create From Current State
POST /api/v1/agent-teams/presets/from-agent-mail
POST /api/v1/agent-teams/presets/from-agent-bridgefrom-agent-mail snapshots selected durable Agent Mail members. from-agent-bridge snapshots currently visible Agent Bridge tmux sessions and can keep multiple same-repo sessions as separate slots.
Update, Duplicate, And Delete
PATCH /api/v1/agent-teams/presets/{preset_id}
POST /api/v1/agent-teams/presets/{preset_id}/duplicate
DELETE /api/v1/agent-teams/presets/{preset_id}Slots
POST /api/v1/agent-teams/presets/{preset_id}/slots
PATCH /api/v1/agent-teams/slots/{slot_id}
DELETE /api/v1/agent-teams/slots/{slot_id}
POST /api/v1/agent-teams/presets/{preset_id}/slots/reorderSlots store provider, repository path, display name, role, charter, bootstrap prompt, launch mode, provider options, and enabled state.
Launch Planning
Plan Launch
POST /api/v1/agent-teams/presets/{preset_id}/plan-launch{
"requested_by": "OpenClaw"
}The plan checks provider availability, Agent Mail MCP/hooks readiness, reusable Agent Bridge sessions, disabled slots, and launch-option validity.
Launch
POST /api/v1/agent-teams/presets/{preset_id}/launch{
"requested_by": "OpenClaw",
"confirm_plan_hash": "returned-plan-hash"
}Use confirm_plan_hash after reviewing a plan. Local automation can pass skip_plan_confirmation: true when it intentionally wants a one-step launch; stale plans return 409 with the updated plan.
After launch, agents register through Agent Mail and receive team-slot role and charter context.
