Agents

Get session

Reads the state of a session started by POST /agents/execute: whether it is running, waiting in line, or finished, where it sits in its queue, and how much work that queue is holding. Cheap enough to poll while waiting for enqueued work to start.

post/agents/sessions/get

Request body

sessionIdstring required

The ID of the session, as returned by POST /agents/execute

Example request

{
  "sessionId": "agent_conversation_thread_01k1v4m0000000000000000000"
}

Response

The session

sessionIdstring required

The ID of the session, as returned by POST /agents/execute

agentIdstring required

The ID of the agent running the session

status'Pending' | 'InProgress' | 'Completed' | 'Failed' | 'Paused' | 'WaitingInLine' | 'Sleeping' required

Lifecycle status of the session

queuePositionInLineinteger nullable required

Place in the waiting line while the status is WaitingInLine (1 = next to run). Null once the session has started, and for sessions that never waited

createdAtstring required

When the session was created, as an ISO 8601 timestamp

statusLastUpdatedAtstring required

When the session last changed status, as an ISO 8601 timestamp

Example response

{
  "sessionId": "agent_conversation_thread_01k1v4m0000000000000000000",
  "status": "WaitingInLine"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.