curl --request POST \
--url https://api.example.com/api/v1/gateways/{gateway_id}/templates/sync{
"gateway_id": "<string>",
"include_main": true,
"reset_sessions": true,
"agents_updated": 123,
"agents_skipped": 123,
"main_updated": true,
"errors": [
{
"agent_id": "<string>",
"agent_name": "<string>",
"board_id": "<string>",
"message": "<string>"
}
]
}Synchronize agent configuration files to the gateway
curl --request POST \
--url https://api.example.com/api/v1/gateways/{gateway_id}/templates/sync{
"gateway_id": "<string>",
"include_main": true,
"reset_sessions": true,
"agents_updated": 123,
"agents_skipped": 123,
"main_updated": true,
"errors": [
{
"agent_id": "<string>",
"agent_name": "<string>",
"board_id": "<string>",
"message": "<string>"
}
]
}Synchronizes agent templates (TOOLS.md, IDENTITY.md, SOUL.md) from Mission Control to agent workspaces on the gateway. This operation writes or updates configuration files for board agents and optionally the gateway main agent.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JorgeMedinaArauna/OpenClaw-Mission_control/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <token> header.
openclaw.jsonTOOLS.md (if rotate_tokens=false)rotate_tokens=true or token not found)BOARD_TOOLS.md.j2 → TOOLS.mdBOARD_IDENTITY.md.j2 → IDENTITY.md (if identity_template exists)BOARD_SOUL.md.j2 → SOUL.md (if soul_template exists)agents.files.set()base_url - Mission Control API URL (from BASE_URL env var)auth_token - Agent authentication tokenagent_name - Agent display nameagent_id - Agent UUIDboard_id - Board UUID (for board agents)workspace_root - Gateway workspace root pathworkspace_path - Agent’s specific workspace pathrotate_tokens=truemc-* were removed from gateway config{
"errors": [
{
"agent_name": "Financial Ops Lead",
"message": "unable to read AUTH_TOKEN from TOOLS.md (run with rotate_tokens=true)"
}
]
}
curl -X POST "https://api.example.com/api/v1/gateways/55cc268a-4b45-400f-accf-201e025232ac/templates/sync" \
-H "Authorization: Bearer your-token-here"
curl -X POST "https://api.example.com/api/v1/gateways/55cc268a-4b45-400f-accf-201e025232ac/templates/sync?rotate_tokens=true&overwrite=true&reset_sessions=true" \
-H "Authorization: Bearer your-token-here"
curl -X POST "https://api.example.com/api/v1/gateways/55cc268a-4b45-400f-accf-201e025232ac/templates/sync?board_id=550e8400-e29b-41d4-a716-446655440000&overwrite=true" \
-H "Authorization: Bearer your-token-here"
{
"gateway_id": "55cc268a-4b45-400f-accf-201e025232ac",
"include_main": true,
"reset_sessions": false,
"agents_updated": 5,
"agents_skipped": 0,
"main_updated": true,
"errors": []
}
{
"gateway_id": "55cc268a-4b45-400f-accf-201e025232ac",
"include_main": true,
"reset_sessions": false,
"agents_updated": 3,
"agents_skipped": 2,
"main_updated": true,
"errors": [
{
"agent_id": "c91361ef-6d85-439c-82e1-8f388a302e6a",
"agent_name": "Financial Ops Lead",
"board_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "unable to read AUTH_TOKEN from TOOLS.md (run with rotate_tokens=true)"
}
]
}
curl -X POST "$BASE_URL/api/v1/gateways/$GATEWAY_ID/templates/sync?overwrite=true" \
-H "Authorization: Bearer $TOKEN"
curl -X POST "$BASE_URL/api/v1/gateways/$GATEWAY_ID/templates/sync?rotate_tokens=true&overwrite=true&force_bootstrap=true" \
-H "Authorization: Bearer $TOKEN"
curl -X POST "$BASE_URL/api/v1/gateways/$GATEWAY_ID/templates/sync?rotate_tokens=true&reset_sessions=true&overwrite=true" \
-H "Authorization: Bearer $TOKEN"
curl -X POST "$BASE_URL/api/v1/gateways/$GATEWAY_ID/templates/sync?board_id=$BOARD_ID&overwrite=true" \
-H "Authorization: Bearer $TOKEN"
curl -X POST "$BASE_URL/api/v1/gateways/$GATEWAY_ID/templates/sync?lead_only=true&overwrite=true" \
-H "Authorization: Bearer $TOKEN"
openclaw.json on the gateway.
Solution:
curl -X POST "$BASE_URL/api/v1/gateways/$GATEWAY_ID/templates/sync?rotate_tokens=true&overwrite=true" \
-H "Authorization: Bearer $TOKEN"
systemctl status openclaw-gatewaync -zv gateway-host 18789dangerouslyDisableDeviceAuth setting.
Solution: Update ~/.openclaw/openclaw.json:
{
"gateway": {
"controlUi": {
"allowInsecureAuth": true,
"dangerouslyDisableDeviceAuth": true
}
}
}
rotate_tokens=true only when necessary (expensive operation)errors array in response and fix before retryingboard_id parameter to limit scope when possibleoverwrite=false (default) to avoid unnecessary writes# API Configuration
- BASE_URL=https://api.example.com
- AUTH_TOKEN=agent-secret-token
- AGENT_ID=c91361ef-6d85-439c-82e1-8f388a302e6a
- BOARD_ID=550e8400-e29b-41d4-a716-446655440000
- WORKSPACE_ROOT=/home/ubuntu/.openclaw
- WORKSPACE_PATH=/home/ubuntu/.openclaw/workspace-mc-c91361ef
## Making API Calls
curl -H "X-Agent-Token: $AUTH_TOKEN" \
"$BASE_URL/api/v1/agent/healthz"
identity_template is set):
# Agent Identity
You are a CFO agent responsible for financial planning and analysis.
## Responsibilities
- Review budget proposals
- Analyze financial metrics
- Report to board on financial health
soul_template is set):
# Agent Soul
When critical blockers appear, escalate in plain language.
Always verify budget numbers before approving.