Skip to content

Agent

CompozyOS Agent HTTP endpoints.

For people running agent work32 pages in this section
GET
/api/agent/context

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Response Body

OK

application/json
  1. response
context*
curl -X GET "https://example.com/api/agent/context" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string"
{  "context": {    "capabilities": {      "capabilities": [        {          "id": "string",          "source": "string",          "summary": "string"        }      ],      "section": {        "limit": 0,        "returned": 0,        "truncated": true      }    },    "limits": {      "context_section_limit": 0,      "max_active_task_leases": 0,      "max_children": 0,      "max_spawn_depth": 0    },    "provenance": {      "generated_at": "2019-08-24T14:15:22Z",      "source": "string"    },    "self": {      "agent_name": "string",      "model": "string",      "provider": "string",      "session_id": "string"    },    "session": {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "name": "string",      "state": "starting",      "type": "user",      "updated_at": "2019-08-24T14:15:22Z"    },    "soul": {      "active": true,      "config_digest": "string",      "digest": "string",      "enabled": true,      "max_body_bytes": 0,      "max_bytes": 0,      "present": true,      "principles": [        "string"      ],      "role": "string",      "snapshot_id": "string",      "source_path": "string",      "tone": [        "string"      ],      "truncated": true,      "valid": true,      "validation_status": "missing"    },    "task": {      "available": true,      "bundle": {        "current_run": {          "attempt": 0,          "claim_token_hash": "string",          "claimed_at": "2019-08-24T14:15:22Z",          "claimed_by": {            "kind": "human",            "ref": "string"          },          "designation": {            "brief": "string",            "index": 0          },          "designation_group_id": "string",          "ended_at": "2019-08-24T14:15:22Z",          "error": "string",          "failure_kind": "string",          "heartbeat_at": "2019-08-24T14:15:22Z",          "id": "string",          "lease_until": "2019-08-24T14:15:22Z",          "loop_run_id": "string",          "max_attempts": 0,          "previous_run_id": "string",          "queued_at": "2019-08-24T14:15:22Z",          "recovery_count": 0,          "resolved_worktree_mode": "inherit",          "resolved_worktree_ref": "string",          "run_kind": 0,          "session_id": "string",          "started_at": "2019-08-24T14:15:22Z",          "status": "queued",          "task_id": "string",          "tokens_used": 0,          "worktree_id": "string"        },        "execution_profile": {          "coordinator": {            "agent_name": "string",            "guidance": "string",            "mode": "inherit",            "model": "string",            "provider": "string"          },          "created_at": "2019-08-24T14:15:22Z",          "participants": {            "allowed_agent_names": [              "string"            ],            "preferred_agent_names": [              "string"            ],            "preferred_capabilities": [              "string"            ],            "required_capabilities": [              "string"            ]          },          "review": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "agent_name": "string",            "allowed_agent_names": [              "string"            ],            "model": "string",            "preferred_agent_names": [              "string"            ],            "preferred_capabilities": [              "string"            ],            "provider": "string",            "reasoning_effort": "string",            "required_capabilities": [              "string"            ],            "speed": "normal"          },          "runtime": {            "mode": "default"          },          "task_id": "string",          "updated_at": "2019-08-24T14:15:22Z",          "worker": {            "acp_options": [              {                "bool_value": true,                "id": "string",                "value_id": "string"              }            ],            "agent_name": "string",            "allowed_agent_names": [              "string"            ],            "mode": "inherit",            "model": "string",            "preferred_agent_names": [              "string"            ],            "preferred_capabilities": [              "string"            ],            "provider": "string",            "reasoning_effort": "string",            "required_capabilities": [              "string"            ],            "speed": "normal"          },          "worktree": {            "mode": "inherit",            "worktree_ref": "string"          }        },        "handoff_summary": "string",        "latest_event_seq": 0,        "limits": {          "context_body_max_bytes": 0,          "max_runtime_seconds": 0,          "summary_max_bytes": 0        },        "prior_attempts": [          {            "attempt": 0,            "claim_token_hash": "string",            "claimed_at": "2019-08-24T14:15:22Z",            "claimed_by": {              "kind": "human",              "ref": "string"            },            "designation": {              "brief": "string",              "index": 0            },            "designation_group_id": "string",            "ended_at": "2019-08-24T14:15:22Z",            "error": "string",            "failure_kind": "string",            "heartbeat_at": "2019-08-24T14:15:22Z",            "id": "string",            "lease_until": "2019-08-24T14:15:22Z",            "loop_run_id": "string",            "max_attempts": 0,            "previous_run_id": "string",            "queued_at": "2019-08-24T14:15:22Z",            "recovery_count": 0,            "resolved_worktree_mode": "inherit",            "resolved_worktree_ref": "string",            "run_kind": 0,            "session_id": "string",            "started_at": "2019-08-24T14:15:22Z",            "status": "queued",            "task_id": "string",            "tokens_used": 0,            "worktree_id": "string"          }        ],        "recent_events": [          {            "actor": {              "kind": "human",              "ref": "string"            },            "event_id": "string",            "event_type": "string",            "origin": {              "kind": "cli",              "ref": "string"            },            "payload": null,            "reason": "string",            "run": {              "attempt": 0,              "claim_token_hash": "string",              "claimed_at": "2019-08-24T14:15:22Z",              "claimed_by": {                "kind": "human",                "ref": "string"              },              "designation": {                "brief": "string",                "index": 0              },              "designation_group_id": "string",              "ended_at": "2019-08-24T14:15:22Z",              "error": "string",              "failure_kind": "string",              "heartbeat_at": "2019-08-24T14:15:22Z",              "id": "string",              "lease_until": "2019-08-24T14:15:22Z",              "loop_run_id": "string",              "max_attempts": 0,              "previous_run_id": "string",              "queued_at": "2019-08-24T14:15:22Z",              "recovery_count": 0,              "resolved_worktree_mode": "inherit",              "resolved_worktree_ref": "string",              "run_kind": 0,              "session_id": "string",              "started_at": "2019-08-24T14:15:22Z",              "status": "queued",              "task_id": "string",              "tokens_used": 0,              "worktree_id": "string"            },            "sequence": 0,            "task": {              "effective_paused": true,              "id": "string",              "identifier": "string",              "latest_event_seq": 0,              "owner": {                "kind": "human",                "ref": "string"              },              "paused": true,              "paused_by_task_id": "string",              "priority": "low",              "scope": "global",              "status": "draft",              "title": "string",              "workspace_id": "string"            },            "timestamp": "2019-08-24T14:15:22Z"          }        ],        "review_continuation": {          "missing_work": [            "string"          ],          "next_round_guidance": "string",          "outcome": "string",          "reason": "string",          "review_id": "string",          "review_round": 0,          "reviewed_run_id": "string"        },        "review_history": [          {            "attempt": 0,            "outcome": "string",            "reason": "string",            "review_id": "string",            "review_round": 0,            "reviewed_at": "string",            "reviewer_label": "string",            "run_id": "string",            "status": "string"          }        ],        "task": {          "effective_paused": true,          "id": "string",          "identifier": "string",          "latest_event_seq": 0,          "owner": {            "kind": "human",            "ref": "string"          },          "paused": true,          "paused_by_task_id": "string",          "priority": "low",          "scope": "global",          "status": "draft",          "title": "string",          "workspace_id": "string"        }      },      "lease": {        "claim_token_hash": "string",        "claimed_by": {          "kind": "human",          "ref": "string"        },        "heartbeat_at": "2019-08-24T14:15:22Z",        "lease_until": "2019-08-24T14:15:22Z",        "run_id": "string",        "session_id": "string",        "status": "queued",        "task_id": "string"      },      "task": {        "effective_paused": true,        "id": "string",        "identifier": "string",        "latest_event_seq": 0,        "owner": {          "kind": "human",          "ref": "string"        },        "paused": true,        "paused_by_task_id": "string",        "priority": "low",        "scope": "global",        "status": "draft",        "title": "string",        "workspace_id": "string"      }    },    "workspace": {      "id": "string",      "name": "string",      "root_dir": "string"    }  }}
GET
/api/agent/coordinator/config

Query Parameters

workspace?string

Workspace id or path

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Response Body

OK

application/json
  1. response
coordinator*
curl -X GET "https://example.com/api/agent/coordinator/config" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string"
{  "coordinator": {    "agent_name": "string",    "default_ttl_seconds": 0,    "enabled": true,    "max_active_sessions_per_workspace": 0,    "max_children": 0,    "model": "string",    "provider": "string",    "source": "workspace",    "workspace_id": "string"  }}
GET
/api/agent/me

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Response Body

OK

application/json
  1. response
me*
curl -X GET "https://example.com/api/agent/me" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string"
{  "me": {    "active_task_leases": [      {        "claim_token_hash": "string",        "claimed_by": {          "kind": "human",          "ref": "string"        },        "heartbeat_at": "2019-08-24T14:15:22Z",        "lease_until": "2019-08-24T14:15:22Z",        "run_id": "string",        "session_id": "string",        "status": "queued",        "task_id": "string"      }    ],    "capabilities": [      {        "id": "string",        "source": "string",        "summary": "string"      }    ],    "coordinator": {      "agent_name": "string",      "default_ttl_seconds": 0,      "enabled": true,      "max_active_sessions_per_workspace": 0,      "max_children": 0,      "model": "string",      "provider": "string",      "source": "workspace",      "workspace_id": "string"    },    "limits": {      "context_section_limit": 0,      "max_active_task_leases": 0,      "max_children": 0,      "max_spawn_depth": 0    },    "self": {      "agent_name": "string",      "model": "string",      "provider": "string",      "session_id": "string"    },    "session": {      "created_at": "2019-08-24T14:15:22Z",      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "name": "string",      "state": "starting",      "type": "user",      "updated_at": "2019-08-24T14:15:22Z"    },    "workspace": {      "id": "string",      "name": "string",      "root_dir": "string"    }  }}
POST
/api/agent/notify

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
body?string
Lengthlength <= 240
title*string
Length1 <= length <= 80

Response Body

Notification outcome

application/json
  1. response
outcome*string
retry_after_ms?integer
Formatint64
curl -X POST "https://example.com/api/agent/notify" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{  "outcome": "string",  "retry_after_ms": 0}
GET
/api/agent/soul

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Response Body

OK

application/json
  1. response
active*boolean
agent_name?string
body?string
config_provenance*
created_at?|
Formatdate-time
diagnostics?array<>
digest?string
enabled*boolean
frontmatter*
limits*
present*boolean
revision_id?string
snapshot_id?string
source_path?string
truncated?boolean
valid*boolean
validation_status*string
Value in"missing""inactive""valid""invalid"
curl -X GET "https://example.com/api/agent/soul" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string"
{  "active": true,  "agent_name": "string",  "body": "string",  "config_provenance": {    "context_projection_bytes": 0,    "digest": "string",    "enabled": true,    "max_body_bytes": 0,    "source": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "diagnostics": [    {      "code": "string",      "column": 0,      "field": "string",      "line": 0,      "message": "string",      "owner_surface": "string",      "section": "string",      "severity": "info",      "source_path": "string"    }  ],  "digest": "string",  "enabled": true,  "frontmatter": {    "collaboration": [      "string"    ],    "constraints": [      "string"    ],    "principles": [      "string"    ],    "role": "string",    "tags": [      "string"    ],    "tone": [      "string"    ],    "version": "string"  },  "limits": {    "context_projection_bytes": 0,    "max_body_bytes": 0,    "max_bytes": 0  },  "present": true,  "revision_id": "string",  "snapshot_id": "string",  "source_path": "string",  "truncated": true,  "valid": true,  "validation_status": "missing"}
POST
/api/agent/soul/validate

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
agent_name?string
body?string
workspace_id?string

Response Body

OK

application/json
  1. response
active*boolean
agent_name?string
body?string
config_provenance*
created_at?|
Formatdate-time
diagnostics?array<>
digest?string
enabled*boolean
frontmatter*
limits*
present*boolean
revision_id?string
snapshot_id?string
source_path?string
truncated?boolean
valid*boolean
validation_status*string
Value in"missing""inactive""valid""invalid"
curl -X POST "https://example.com/api/agent/soul/validate" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "active": true,  "agent_name": "string",  "body": "string",  "config_provenance": {    "context_projection_bytes": 0,    "digest": "string",    "enabled": true,    "max_body_bytes": 0,    "source": "string"  },  "created_at": "2019-08-24T14:15:22Z",  "diagnostics": [    {      "code": "string",      "column": 0,      "field": "string",      "line": 0,      "message": "string",      "owner_surface": "string",      "section": "string",      "severity": "info",      "source_path": "string"    }  ],  "digest": "string",  "enabled": true,  "frontmatter": {    "collaboration": [      "string"    ],    "constraints": [      "string"    ],    "principles": [      "string"    ],    "role": "string",    "tags": [      "string"    ],    "tone": [      "string"    ],    "version": "string"  },  "limits": {    "context_projection_bytes": 0,    "max_body_bytes": 0,    "max_bytes": 0  },  "present": true,  "revision_id": "string",  "snapshot_id": "string",  "source_path": "string",  "truncated": true,  "valid": true,  "validation_status": "missing"}
POST
/api/agent/spawn

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
acp_options?array<>
agent_name*string
Match^[a-z][a-z0-9_-]{0,105}$
Lengthlength <= 106
auto_stop_on_parent*boolean
idempotency_key?string
inherit_permissions?boolean
model?string
name?string
new_worktree?|
notify_creator?boolean|null
permissions*
prompt?string
prompt_overlay?string
provider?string
reasoning_effort?string
spawn_role*string
speed?string
Value in"normal""fast"
toolsets?array<string>
ttl_seconds*integer
Formatint64
workspace?string
worktree?string

Response Body

Created

application/json
  1. response
spawn*
curl -X POST "https://example.com/api/agent/spawn" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{    "agent_name": "string",    "auto_stop_on_parent": true,    "permissions": {},    "spawn_role": "string",    "ttl_seconds": 0  }'
{  "spawn": {    "lineage": {      "auto_stop_on_parent": true,      "kind": "",      "notify_creator": true,      "origin_agent_name": "string",      "origin_message_id": "string",      "parent_session_id": "string",      "permission_policy": {        "mcp_servers": [          "string"        ],        "skills": [          "string"        ],        "tools": [          "string"        ],        "workspace_paths": [          "string"        ]      },      "root_session_id": "string",      "spawn_budget": {        "max_active_per_workspace": 0,        "max_children": 0,        "max_depth": 0,        "ttl_seconds": 0      },      "spawn_depth": 0,      "spawn_role": "string",      "ttl_expires_at": "2019-08-24T14:15:22Z"    },    "permissions": {      "mcp_servers": [        "string"      ],      "skills": [        "string"      ],      "tools": [        "string"      ],      "workspace_paths": [        "string"      ]    },    "prompt": {      "error": "string",      "message_id": "string",      "reply_watch_id": "string",      "reply_watch_state": "string",      "status": "string"    },    "session": {      "activity": {        "current_tool": "string",        "deadline_at": "2019-08-24T14:15:22Z",        "elapsed_ms": 0,        "elapsed_seconds": 0,        "idle_seconds": 0,        "iteration_current": 0,        "iteration_max": 0,        "last_activity_at": "2019-08-24T14:15:22Z",        "last_activity_detail": "string",        "last_activity_kind": "string",        "last_progress_at": "2019-08-24T14:15:22Z",        "tool_call_id": "string",        "turn_id": "string",        "turn_source": "string",        "turn_started_at": "2019-08-24T14:15:22Z"      },      "agent_name": "string",      "archived_at": "2019-08-24T14:15:22Z",      "attach_expires_at": "2019-08-24T14:15:22Z",      "attachable": true,      "attached_to": "string",      "attention": "string",      "attention_changed_at": "2019-08-24T14:15:22Z",      "available_commands": [        {          "description": "string",          "input": {            "hint": "string"          },          "name": "string"        }      ],      "badge": "running",      "board_column": "needs_you",      "branch": "string",      "busy_input": {        "default_mode": "string",        "steer_capability": "steer_ext",        "steer_delivery": "injected"      },      "children": {        "done": 0,        "in_review": 0,        "needs_you": 0,        "total": 0,        "working": 0      },      "created_at": "2019-08-24T14:15:22Z",      "derivation": {        "first_prompt": "string",        "kind": "",        "native_fork_error": "string",        "native_state": "string",        "seed": "string",        "source_session_id": "string"      },      "diagnostics": [        {          "category": "string",          "code": "string",          "data_freshness": "string",          "doc_url": "string",          "evidence": {            "property1": null,            "property2": null          },          "id": "string",          "message": "string",          "severity": "string",          "suggested_command": "string",          "title": "string"        }      ],      "effective_workspace_access": "string",      "escalated": true,      "failure": {        "crash_bundle_path": "string",        "kind": "string",        "reason_code": "string",        "summary": "string"      },      "folder_id": "string",      "health": {        "active_prompt": true,        "agent_name": "string",        "attachable": true,        "attention": "string",        "eligible_for_wake": true,        "escalated": true,        "health": "healthy",        "ineligibility_reason": "session_prompt_active",        "last_activity_at": "2019-08-24T14:15:22Z",        "last_error": "string",        "last_presence_at": "2019-08-24T14:15:22Z",        "lifecycle_state": "starting",        "session_id": "string",        "state": "idle",        "updated_at": "2019-08-24T14:15:22Z",        "verified": true,        "workspace_id": "string"      },      "id": "string",      "lineage": {        "auto_stop_on_parent": true,        "kind": "",        "notify_creator": true,        "origin_agent_name": "string",        "origin_message_id": "string",        "parent_session_id": "string",        "permission_policy": {          "mcp_servers": [            "string"          ],          "skills": [            "string"          ],          "tools": [            "string"          ],          "workspace_paths": [            "string"          ]        },        "root_session_id": "string",        "spawn_budget": {          "max_active_per_workspace": 0,          "max_children": 0,          "max_depth": 0,          "ttl_seconds": 0        },        "spawn_depth": 0,        "spawn_role": "string",        "ttl_expires_at": "2019-08-24T14:15:22Z"      },      "monitor_summary": {        "active": 0      },      "name": "string",      "parent_title": "string",      "pending_interactions": [        {          "choices": [            "string"          ],          "created_at": "2019-08-24T14:15:22Z",          "decisions": [            "string"          ],          "interaction_id": "string",          "kind": "string",          "provider_request_id": "string",          "resolution": "string",          "resolved_at": "2019-08-24T14:15:22Z",          "resolved_by": "string",          "status": "string",          "title": "string",          "tool_id": "string",          "turn_id": "string"        }      ],      "profile_archived": true,      "profile_color": "string",      "profile_emoji": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "pull_request": {        "checks": {          "failed": 0,          "failed_names": [            "string"          ],          "passed": 0,          "pending": 0,          "state": "passing"        },        "draft": true,        "head_sha": "string",        "mergeable": "mergeable",        "number": 0,        "provider": "string",        "ready_to_merge": true,        "review_decision": "approved",        "state": "open",        "url": "string"      },      "pull_request_lookup": {        "cause": "string",        "observed_at": "2019-08-24T14:15:22Z",        "stale": true,        "state": "ok"      },      "queue": {        "cap": 0,        "entries": 0      },      "reply_watches": [        {          "created_at": "2019-08-24T14:15:22Z",          "id": "string",          "message_id": "string",          "state": "string",          "target_session_id": "string"        }      ],      "runtime": {        "acp_caps": {          "config_options": [            {              "category": "string",              "current_bool": true,              "current_value_id": "string",              "description": "string",              "id": "string",              "kind": "string",              "label": "string",              "values": [                {                  "description": "string",                  "group_id": "string",                  "group_label": "string",                  "label": "string",                  "value": "string"                }              ]            }          ],          "prompt_audio": true,          "prompt_embedded_context": true,          "prompt_image": true,          "supported_modes": [            "string"          ],          "supports_fork_session": true,          "supports_load_session": true,          "supports_resume_session": true        },        "acp_session_id": "string",        "effective": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "failure": "string",        "generation": 0,        "last_known": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal",          "speed_resolution": {            "reason": "capability_absent",            "requested": "normal",            "status": "applied"          }        },        "recovery": {          "attempt": 0,          "generation": 0,          "last_attempt_at": "2019-08-24T14:15:22Z",          "last_error": "string",          "max_attempts": 0,          "next_attempt_at": "2019-08-24T14:15:22Z",          "started_at": "2019-08-24T14:15:22Z"        },        "requested": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selected": {          "acp_options": [            {              "bool_value": true,              "id": "string",              "value_id": "string"            }          ],          "model": "string",          "provider": "string",          "reasoning_effort": "string",          "speed": "normal"        },        "selection_revision": 0,        "status": "string",        "transition": "string"      },      "scope": "string",      "state": "starting",      "stop_cause": "string",      "stop_detail": "string",      "stop_reason": "completed",      "subagent_summary": {        "attention": 0,        "failed": 0,        "live": 0,        "most_urgent": "string",        "total": 0      },      "supervision": {        "quiet_warning": {          "quiet_since": "2019-08-24T14:15:22Z",          "stop_at": "2019-08-24T14:15:22Z",          "warned_at": "2019-08-24T14:15:22Z"        },        "sources": [          {            "error": "string",            "kind": "agent_progress",            "ref": "string",            "state": "string"          }        ],        "work_signals": [          {            "kind": "agent_progress",            "ref": "string",            "since": "2019-08-24T14:15:22Z"          }        ]      },      "transcript_epoch": 0,      "type": "user",      "updated_at": "2019-08-24T14:15:22Z",      "verified": true,      "waiting_on": "sessions",      "workspace_id": "string",      "workspace_path": "string",      "worktree_binding": {        "available": true,        "unavailable_reason": "string"      },      "worktree_id": "string"    },    "worktree": {      "base_sha": "string",      "branch": "string",      "created": true,      "id": "string",      "name": "string",      "path": "string"    }  }}
POST
/api/agent/tasks/claim-next

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
idempotency_key?string
lease_seconds?integer
Formatint64
priority_min?integer
required_capabilities?array<string>
run_id?string
wait?boolean
workspace_id?string

Response Body

OK

application/json
  1. response
claim*
curl -X POST "https://example.com/api/agent/tasks/claim-next" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "claim": {    "lease": {      "claim_token_hash": "string",      "claimed_by": {        "kind": "human",        "ref": "string"      },      "heartbeat_at": "2019-08-24T14:15:22Z",      "lease_until": "2019-08-24T14:15:22Z",      "run_id": "string",      "session_id": "string",      "status": "queued",      "task_id": "string"    },    "run": {      "attempt": 0,      "claim_token_hash": "string",      "claimed_at": "2019-08-24T14:15:22Z",      "claimed_by": {        "kind": "human",        "ref": "string"      },      "designation": {        "brief": "string",        "index": 0      },      "designation_group_id": "string",      "ended_at": "2019-08-24T14:15:22Z",      "error": "string",      "failure_kind": "string",      "heartbeat_at": "2019-08-24T14:15:22Z",      "id": "string",      "idempotency_key": "string",      "lease_until": "2019-08-24T14:15:22Z",      "metadata": null,      "origin": {        "kind": "cli",        "ref": "string"      },      "previous_run_id": "string",      "profile_color": "string",      "profile_icon": "string",      "profile_id": "string",      "profile_name": "string",      "queued_at": "2019-08-24T14:15:22Z",      "recovery_count": 0,      "resolved_worktree_mode": "none",      "resolved_worktree_ref": "string",      "result": null,      "result_bytes": 0,      "result_ref": "string",      "session_id": "string",      "started_at": "2019-08-24T14:15:22Z",      "status": "queued",      "task_id": "string",      "worktree_id": "string"    },    "task": {      "effective_paused": true,      "id": "string",      "identifier": "string",      "latest_event_seq": 0,      "owner": {        "kind": "human",        "ref": "string"      },      "paused": true,      "paused_by_task_id": "string",      "priority": "low",      "scope": "global",      "status": "draft",      "title": "string",      "workspace_id": "string"    }  }}
POST
/api/agent/tasks/{run_id}/complete

Path Parameters

run_id*string

Task run id

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
created_task_ids?array<string>
result?unknown

Response Body

OK

application/json
  1. response
lease*
curl -X POST "https://example.com/api/agent/tasks/string/complete" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "lease": {    "claim_token_hash": "string",    "claimed_by": {      "kind": "human",      "ref": "string"    },    "heartbeat_at": "2019-08-24T14:15:22Z",    "lease_until": "2019-08-24T14:15:22Z",    "run_id": "string",    "session_id": "string",    "status": "queued",    "task_id": "string"  }}
POST
/api/agent/tasks/{run_id}/fail

Path Parameters

run_id*string

Task run id

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
error*string
metadata?unknown

Response Body

OK

application/json
  1. response
lease*
curl -X POST "https://example.com/api/agent/tasks/string/fail" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{    "error": "string"  }'
{  "lease": {    "claim_token_hash": "string",    "claimed_by": {      "kind": "human",      "ref": "string"    },    "heartbeat_at": "2019-08-24T14:15:22Z",    "lease_until": "2019-08-24T14:15:22Z",    "run_id": "string",    "session_id": "string",    "status": "queued",    "task_id": "string"  }}
POST
/api/agent/tasks/{run_id}/heartbeat

Path Parameters

run_id*string

Task run id

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
lease_seconds?integer
Formatint64

Response Body

OK

application/json
  1. response
lease*
curl -X POST "https://example.com/api/agent/tasks/string/heartbeat" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "lease": {    "claim_token_hash": "string",    "claimed_by": {      "kind": "human",      "ref": "string"    },    "heartbeat_at": "2019-08-24T14:15:22Z",    "lease_until": "2019-08-24T14:15:22Z",    "run_id": "string",    "session_id": "string",    "status": "queued",    "task_id": "string"  }}
POST
/api/agent/tasks/{run_id}/release

Path Parameters

run_id*string

Task run id

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
reason?string

Response Body

OK

application/json
  1. response
lease*
curl -X POST "https://example.com/api/agent/tasks/string/release" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "lease": {    "claim_token_hash": "string",    "claimed_by": {      "kind": "human",      "ref": "string"    },    "heartbeat_at": "2019-08-24T14:15:22Z",    "lease_until": "2019-08-24T14:15:22Z",    "run_id": "string",    "session_id": "string",    "status": "queued",    "task_id": "string"  }}
POST
/api/agent/tasks/{run_id}/start

Path Parameters

run_id*string

Task run id

Header Parameters

X-Compozy-Session-ID*string

Daemon-issued active session id

X-Compozy-Agent*string

Daemon-issued session agent name

Request Body

JSON request body

application/json
  1. body
idempotency_key?string

Response Body

OK

application/json
  1. response
run*
curl -X POST "https://example.com/api/agent/tasks/string/start" \  -H "X-Compozy-Session-ID: string" \  -H "X-Compozy-Agent: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "run": {    "attempt": 0,    "claim_token_hash": "string",    "claimed_at": "2019-08-24T14:15:22Z",    "claimed_by": {      "kind": "human",      "ref": "string"    },    "designation": {      "brief": "string",      "index": 0    },    "designation_group_id": "string",    "ended_at": "2019-08-24T14:15:22Z",    "error": "string",    "failure_kind": "string",    "heartbeat_at": "2019-08-24T14:15:22Z",    "id": "string",    "idempotency_key": "string",    "lease_until": "2019-08-24T14:15:22Z",    "metadata": null,    "origin": {      "kind": "cli",      "ref": "string"    },    "previous_run_id": "string",    "profile_color": "string",    "profile_icon": "string",    "profile_id": "string",    "profile_name": "string",    "queued_at": "2019-08-24T14:15:22Z",    "recovery_count": 0,    "resolved_worktree_mode": "none",    "resolved_worktree_ref": "string",    "result": null,    "result_bytes": 0,    "result_ref": "string",    "session_id": "string",    "started_at": "2019-08-24T14:15:22Z",    "status": "queued",    "task_id": "string",    "worktree_id": "string"  }}