In plain terms: an
AGENT_SESSION node runs an AI agent such as Claude Code. Each message the node works on is a conversation: what the agent says, the tools it uses, what it asks, and how it ends. These endpoints let you read all of it, and follow every agent of a run in one stream.VIEWER role; sending an agent a message needs OPERATOR and a place in the node’s steerAudience. They exist while yukta.agents.enabled is true (the default). The text of a conversation is written by an AI agent: show it as plain, untrusted text.
A key limited to some sessions reaches only
/api/executions/{executionId}/… of runs in its sessions; a conversation of another session is 404, as one that does not exist.
The conversation
state is STARTING, RUNNING, WAITING (a request is open), IDLE or ENDED; outcome is success, failure or incomplete once it ended. seq is the change sequence of the last change of this record.
Lists
GET /api/conversations and GET /api/executions/{executionId}/conversations take:
Events
GET /api/conversations/{id}/events?after=&limit=&kinds=
An event has seq (strictly increasing over all conversations and events), conversationId, timestamp, kind, itemId and data. Events with the same itemId describe one item: message pieces are appended in order, a later tool, plan or request event replaces the fields it carries.
Text is cut at
yukta.agents.max-message-bytes and tool input and output at max-tool-bytes (truncated: true); secrets are replaced. A page has at most 500 events (limit, default 100). When more follow, the response header X-Next-Cursor holds the number to pass as after. Terminal output is kept in a ring of bytes, so an old chunk may be gone, and over yukta.agents.max-events-per-conversation the oldest events go first and a NOTICE says so.
An agent’s request is answered on the input request endpoints, not here.
Steering an agent
Each call is a control command: ordered, reviewed and audited. All answer202.
POST /api/conversations/{id}/messageswith{"text": "Also update the README", "interrupt": false}sends a message (textis required;interruptdefaults tofalse). The message waits for the end of the agent’s turn unless the agent takes it during the turn orinterruptistrue. The answer holdsqueued: whether it waits for the end of the turn.
403 when the caller may not steer this conversation, 404 when it is unknown or not reachable, 409 (not_live, or unsupported with the capability), 413 over yukta.agents.max-message-bytes and 429 over yukta.agents.messages-per-minute (messages only).
Interrupt, end and terminals
Interrupting or ending an agent and typing into a terminal agent are planned for a future release (they need more testing). Theinterrupt field of a message must be false or absent: true answers 400.
The stream
GET /api/executions/{executionId}/conversations/stream
Two kinds of event, with the sequence number as the SSE
id:
- On connect a client gets the stored history, then every change, in order. A
conversationevent carries a record on connect (one per conversation) and on every change; aneventevent carries an event. - Resuming. Reconnect with
Last-Event-IDset to the lastidyou saw: you get exactly what you missed, no gap and no duplicate. - A slow client that falls far behind is ended by the server and resumes the same way.
- Terminal agents. A new client gets the latest screen before the live output; a terminal view resets itself with it.
- Ending. The stream ends when the run does. An idle stream sends
: pingevery 15 seconds, as the other streams do. - Errors.
404for an unknown run or one of an unreachable session,400for an unknown kind,429when too many streams are open.