Skip to main content

List the child agent runs this session has started

GET 

/session/agents

Lists the session's child agent runs, newest first (by startedAt, then ID). A child agent run starts when an agent in the session calls the launchAgent tool, either with a stored agent definition or with an inline one. Each entry is the whole stored run record, the same object GET /session/agents/{agentRunId} returns, including the derived waiting, question, and paused fields.

  • Select the session with the X-Session-ID header.
  • Paging uses limit (1 to 200, default 50) and offset (default 0). hasMore is true when more runs follow this page.
  • A session that never launched a child returns an empty agents array, not an error.
  • Returns 404 with code SESSION_NOT_FOUND when the session does not exist, and 400 with code VALIDATION_FAILED when a query parameter or the header fails validation, including a parentAgentRunId that is neither an agent run ID nor root.

Request​

Responses​

One page of the session's child agent runs, newest first.

Response Headers
    X-Session-ID

    The session this response belongs to. For session-scoped requests it echoes the X-Session-ID request header; for POST /sessions/open and POST /sessions/system it is the session that was opened or created.

    X-Request-ID

    The request's correlation ID. When the request carried an X-Request-ID header holding a UUID, Peen echoes it; otherwise Peen generates a new UUID. The controller log records the same value for this request.