Events
List Events
GET/v1/sessions/{session_id}/events
Send Events
POST/v1/sessions/{session_id}/events
Stream Events
GET/v1/sessions/{session_id}/events/stream
Models
BetaManagedAgentsEventParams = BetaManagedAgentsUserMessageEventParams { content, type } or BetaManagedAgentsUserInterruptEventParams { type, session_thread_id } or BetaManagedAgentsUserToolConfirmationEventParams { result, tool_use_id, type, deny_message } or 4 moreUnion type for event parameters that can be sent to a session.
BetaManagedAgentsEventParams = BetaManagedAgentsUserMessageEventParams { content, type } or BetaManagedAgentsUserInterruptEventParams { type, session_thread_id } or BetaManagedAgentsUserToolConfirmationEventParams { result, tool_use_id, type, deny_message } or 4 more
Union type for event parameters that can be sent to a session.
One of the following:
BetaManagedAgentsSessionEvent = BetaManagedAgentsUserMessageEvent { id, content, type, processed_at } or BetaManagedAgentsUserInterruptEvent { id, type, processed_at, session_thread_id } or BetaManagedAgentsUserToolConfirmationEvent { id, result, tool_use_id, 4 more } or 32 moreUnion type for all event types in a session.
BetaManagedAgentsSessionEvent = BetaManagedAgentsUserMessageEvent { id, content, type, processed_at } or BetaManagedAgentsUserInterruptEvent { id, type, processed_at, session_thread_id } or BetaManagedAgentsUserToolConfirmationEvent { id, result, tool_use_id, 4 more } or 32 more
Union type for all event types in a session.
One of the following:
BetaManagedAgentsStreamSessionEvents = BetaManagedAgentsUserMessageEvent { id, content, type, processed_at } or BetaManagedAgentsUserInterruptEvent { id, type, processed_at, session_thread_id } or BetaManagedAgentsUserToolConfirmationEvent { id, result, tool_use_id, 4 more } or 34 moreServer-sent event in the session stream.
BetaManagedAgentsStreamSessionEvents = BetaManagedAgentsUserMessageEvent { id, content, type, processed_at } or BetaManagedAgentsUserInterruptEvent { id, type, processed_at, session_thread_id } or BetaManagedAgentsUserToolConfirmationEvent { id, result, tool_use_id, 4 more } or 34 more
Server-sent event in the session stream.
One of the following:
Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a role: "system" turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the user.message, user.tool_result, or user.custom_tool_result it accompanies. Only supported on models that accept mid-conversation system messages.
Privileged context for the accompanying turn and all subsequent turns, appended to the session's system context as a role: "system" turn rather than replacing the top-level system prompt. At most one per request: it must be the final event and immediately follow the user.message, user.tool_result, or user.custom_tool_result it accompanies. Only supported on models that accept mid-conversation system messages.
The id of the agent.tool_use or agent.mcp_tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field.
The id of the agent.tool_use or agent.mcp_tool_use event this result corresponds to, which can be found in the last session.status_idle event's stop_reason.event_ids field.
minLength1
maxLength128