agents

Send a message to the agent's chat.

Changed on

Returns 201 with the acknowledging event once the message reaches the agent. With mailbox command delivery, a send whose outcome is still unknown at the bounded wait returns 202 with { status: "pending", commandId }: the message is accepted and durable, delivery just has not been confirmed yet.

post/agents/{id}/message

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/agents/{id}/message
  • Auth: none declared. Required headers: x-organization-id

Path parameters

idstring required

Headers

x-organization-idstring required

Active organization id (or slug). Required for org-scoped operations; the generated client enforces it at compile time.

Request body

messagestring

Response

Response

idstring required
sequencenumber
streamIdstring required
type'agent.started' | 'agent.stopped' | 'agent.killed' | 'agent.interrupted' | 'agent.error' | 'agent.name' | 'agent.plan' | 'agent.progress' | 'agent.need_input' | 'agent.complete' | 'agent.pr_created' | 'agent.pr_merged' | 'agent.pr_closed' | 'agent.pr_checks_failed' | 'agent.pr_review' | 'agent.setup' | 'agent.tool_use' | 'agent.dev_server' | 'agent.performance_warning' | 'agent.daemon_started' | 'agent.capability_requested' | 'agent.capability_resolved' | 'agent.work_assessment' | 'agent.credentials_refreshed' | 'agent.credentials_refresh_failed' | 'agent.source.dashboard' | 'agent.source.sentry_issue' | 'agent.source.linear_issue' | 'agent.source.slack' | 'agent.source.flow' | 'agent.flow_result' | 'agent.subagent' | 'agent.compact' | 'agent.status_change' | 'agent.runtime_settings_changed' | 'codex.command.result' | 'agent.log' | 'flow.started' | 'flow.node_started' | 'flow.node_completed' | 'flow.node_error' | 'flow.node_retrying' | 'flow.node_skipped' | 'flow.approval_requested' | 'flow.approval_responded' | 'flow.completed' | 'flow.error' | 'flow.cancelled' | 'crew.task_dispatched' | 'crew.task_completed' | 'crew.task_failed' | 'crew.result_published' | 'crew.actor_post' | 'crew.gate_requested' | 'crew.gate_resolved' | 'crew.escalation' | 'message' | 'webhook' | 'turn.started' | 'turn.message_chunk' | 'turn.tool_call' | 'turn.tool_call_update' | 'turn.completed' | 'turn.cancelled' | 'turn.failed' | 'turn.resumed' | 'background.changed' | 'system' | 'user' | 'assistant' | 'result' | 'error' | 'rate_limit_event' | 'control_request' | 'control_response' | 'user_message_chunk' | 'agent_message_chunk' | 'agent_thought_chunk' | 'tool_call' | 'tool_call_update' | 'plan' | 'available_commands_update' | 'current_mode_update' | 'config_option_update' | 'session_info_update' | 'usage_update' | 'devbox.running' | 'devbox.suspended' | 'devbox.shutdown' | 'devbox.failed' | 'devbox.cleaned_up' | 'broker.control.interrupt' | 'broker.control.cancel' | 'broker.claude.control' | 'broker.acp.control' | 'query' | 'controlRequest' | 'initialize' | 'session/new' | 'session/prompt' | 'session/cancel' | 'thread/settings/update' required
payloadunknown required
timestampnumber required
origin'EXTERNAL_EVENT' | 'AGENT_EVENT' | 'USER_EVENT' | 'SYSTEM_EVENT'
sourcestring

Changes

    • warning

      added the new agent.runtime_settings_changed enum value to the response property for the response status

    • warning

      added the new thread/settings/update enum value to the response property for the response status

    • warning

      added the new agent.capability_requested enum value to the response property for the response status

    • warning

      added the new agent.capability_resolved enum value to the response property for the response status