Rensei docs

Read the agent topology cold snapshot (nodes, edges, counters).

Returns the fleet topology snapshot for the authenticated org: session/sub-agent nodes, workflow/handoff/subagent/spawn edges, top counters (sessions / issues / today cost), and a session-activity stream seed. Optionally scoped to a project via ?project=<slug> (a slug that does not resolve in the caller org yields an empty topology, never another project's sessions). Bearer-reachable; the live delta feed is the sibling SSE stream (streamOrgSessionEvents).

GET
/api/sessions/topology

Authorization

headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Query Parameters

project?string

Scope the snapshot to this project slug.

window?string

Observation window: 30m,1h,6h,24h,7d (default 24h). Legacy numeric hours remain supported (1,6,24,168; in-range values snap up, larger values clamp to 7 days). Active sessions are always included; sessions completed before the window are excluded except direct spawn ancestors of sessions on this page.

include?string

Comma-separated node kinds: dispatched,interactive,subagents. Default: all. Subagents require a selected parent session.

Match^(dispatched|interactive|subagents)(,(dispatched|interactive|subagents))*$
ended?string

Ended-session lookback, independent of window. off excludes ended sessions and subagents; omitted uses window.

Value in"off""1h""24h""7d"
endedLimit?integer

Maximum ended parent sessions per page (default 200, maximum 500). Active parent sessions are separately capped at 500. Subagents are capped at 500 per snapshot.

Range1 <= value <= 500
Default200
endedCursor?string

Opaque next cursor from endedPage. Reuse the same project/window/include/ended filters. Active sessions repeat on each page.

Lengthlength <= 2048

Response Body

The bounded topology cold snapshot: at most 500 active parent sessions, endedLimit ended parent sessions, and 500 subagents. Ended history is newest-first, with session id breaking timestamp ties.

application/json
  1. response
windowHours*number
windowCutoff*string
endedPage*
nodes*array<>
edges*array<>
counters*
streamSeed*array<>
Example Request
curl -X GET 'https://app.rensei.ai/api/sessions/topology'
Example Response
{  "windowHours": 0,  "windowCutoff": "string",  "endedPage": {    "limit": 0,    "hasMore": true,    "nextCursor": "string"  },  "nodes": [    {      "sessionId": "string",      "sessionClass": "string",      "displayName": "string",      "title": "string",      "launchedBy": "string",      "repository": "string",      "branch": "string",      "harness": "string",      "modelProfileId": "string",      "modelProfileName": "string",      "publicSessionId": "string",      "hasRecording": true,      "agentId": "string",      "agentName": "string",      "a2aHandle": "string",      "sentCount": 0,      "receivedCount": 0,      "pullRequestUrl": "string",      "agentRole": "string",      "status": "string",      "health": "green",      "lastHeartbeatAt": "string",      "lastProgressAt": "string",      "lastActivityAt": "string",      "budget": {        "maxTokens": 0,        "maxCostUsd": 0,        "maxDurationSeconds": 0      },      "costUsd": "string",      "tokensIn": 0,      "tokensOut": 0,      "costSource": "cost_events",      "subtreeCostUsd": "string",      "spawnedBySessionId": "string",      "startedAt": "string",      "workType": "string",      "issueIdentifier": "string",      "workerId": "string",      "projectName": "string",      "toolCallCount": 0,      "errorCount": 0,      "reservedFiles": [        "string"      ],      "model": "string",      "execution": {        "modelProfileId": "string",        "modelProfileName": "string",        "model": "string",        "modelVersion": "string",        "provider": "string",        "harness": "string",        "effort": "string",        "authMode": "string",        "servingRoute": "string",        "routeId": "string"      },      "capabilities": [        "string"      ],      "issueTitle": "string",      "recentCommands": [        {          "toolName": "string",          "content": "string"        }      ],      "lastActivity": "string",      "lastToolName": "string",      "isAncestor": true,      "isSubAgent": true,      "parentSessionId": "string"    }  ],  "edges": [    {      "id": "string",      "source": "string",      "target": "string",      "type": "handoff",      "count": 1,      "lastAt": "2019-08-24T14:15:22Z"    }  ],  "counters": {    "sessions": 0,    "issues": 0,    "todayCostUsd": 0  },  "streamSeed": [    {      "sessionId": "string",      "sequenceNum": 0,      "activityType": "string",      "toolName": "string",      "content": "string",      "activityTimestamp": "string"    }  ]}