Skip to main content

List one child agent run's compaction lineage

GET 

/session/agents/:agentRunId/compactions

Lists one child agent run's compaction records, newest first (by createdAt, then ID). A child compaction summarizes a prefix of the child's own transcript. It never covers a session message and never replaces a session compaction, so this list and GET /session/compactions describe separate lineages.

A later compaction summarizes the earlier summary plus newer raw messages and points at the earlier record through parentCompactionId. The earlier record stays unchanged.

  • 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 records follow this page.
  • Returns 404 with code SESSION_NOT_FOUND when the session does not exist, 404 with code NOT_FOUND (agent run not found) when the run does not belong to it, and 400 with code VALIDATION_FAILED for invalid paging values.

Request​

Responses​

One page of the child's compaction records, 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.