Creates a new agent record in Mission Control and provisions it on the associated gateway. The agent will be assigned a unique workspace and receive its configuration files (TOOLS.md, IDENTITY.md, etc.).
Authentication
Requires admin or agent authentication via Authorization: Bearer <token> header.
Request Body
Human-readable agent display name (e.g., “Ops triage lead”)
Board ID to scope this agent. Omit only when creating gateway-level agents (requires special permissions)
status
string
default:"provisioning"
Initial lifecycle state: provisioning, active, paused, retired
Runtime heartbeat behavior overrides{
"interval_seconds": 30,
"missing_tolerance": 120
}
Profile hints used by routing and policy checks{
"role": "incident_lead",
"skill": "triage"
}
Template that defines initial intent and behaviorExample: “You are a senior incident response lead.”
Template representing deeper agent instructionsExample: “When critical blockers appear, escalate in plain language.”
Response
Returns an AgentRead object with the same structure as List Agents.
Provisioning Workflow
When you create an agent, Mission Control:
- Validates board access and capacity limits
- Creates an agent record with status
provisioning
- Generates a unique agent key:
mc-<uuid>
- Calculates workspace path:
{gateway.workspace_root}/workspace-{agent_key}/
- Calls gateway RPC:
agents.create(mc-<uuid>)
- Writes configuration files via
agents.files.set():
TOOLS.md - API credentials and endpoints
IDENTITY.md - Agent role and behavior (if identity_template provided)
SOUL.md - Deeper instructions (if soul_template provided)
- Updates status to
ready
Agent IDs and Session IDs
Mission Control agents use a specific ID format:
- Agent Key:
mc-<uuid> (e.g., mc-c91361ef-6d85-439c-82e1-8f388a302e6a)
- Session ID:
agent:mc-<uuid>:main (stored in openclaw_session_id)
- Workspace Path:
{workspace_root}/workspace-mc-<uuid>/
These are distinct from manually configured agents in openclaw.json (e.g., cfo, architect).
Example Request
curl -X POST "https://api.example.com/api/v1/agents" \
-H "Authorization: Bearer your-token-here" \
-H "Content-Type: application/json" \
-d '{
"name": "Financial Operations Lead",
"board_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "active",
"identity_profile": {
"role": "cfo",
"specialty": "budget_planning"
},
"identity_template": "You are a CFO agent responsible for financial planning and analysis."
}'
Example Response
{
"id": "c91361ef-6d85-439c-82e1-8f388a302e6a",
"gateway_id": "55cc268a-4b45-400f-accf-201e025232ac",
"board_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Financial Operations Lead",
"status": "ready",
"gateway_agent_id": "agent-01JCXYZ123",
"workspace_path": "/home/ubuntu/.openclaw/workspace-mc-c91361ef-6d85-439c-82e1-8f388a302e6a",
"is_mc_agent": true,
"is_board_lead": false,
"is_gateway_main": false,
"openclaw_session_id": "agent:mc-c91361ef-6d85-439c-82e1-8f388a302e6a:main",
"created_at": "2026-03-05T10:30:00Z",
"updated_at": "2026-03-05T10:30:00Z",
"identity_profile": {
"role": "cfo",
"specialty": "budget_planning"
}
}
Error Responses
Insufficient permissions or board capacity exceeded
Board ID does not exist or is not accessible
Validation failed (e.g., name is empty or too long)
Gateway RPC call failed (gateway unreachable or authentication failed)
Notes
- Agent tokens are automatically generated during provisioning and stored in
TOOLS.md
- The agent must be able to read
TOOLS.md from its workspace to authenticate with Mission Control
- If the gateway entry is missing from
openclaw.json, sync will fail (use Template Sync with rotate_tokens=true)