List Sessions
List sessions for the workspace, most recently active first.
List sessions for the workspace, most recently active first.
Filter with agent_id and state. kind=agent restricts the listing to
conversations with the agent itself, excluding agent-builder conversations;
kind=build returns only the latter. archived=true lists archived
conversations instead of live ones. Page through older sessions with
active_before and cursor_id: pass the previous page's oldest
last_activity_at as active_before and its id as cursor_id. Both values
form the keyset cursor and break ties when sessions share the same timestamp.
Each entry carries the display fields — title, first_prompt, origin, and
(when agent_id is given) has_artifacts — but no events; fetch a
conversation's timeline via GET /api/v1/sessions/{session_id}.
Authorization
HTTPBearer In: header
Query Parameters
50falseHeader Parameters
Response Body
application/json
application/json
curl -X GET "https://api.levainlabs.com/api/v1/sessions/"[
{
"id": "string",
"agent_id": "string",
"agent_version_id": "string",
"state": "string",
"title": "string",
"kind": "agent",
"first_prompt": "string",
"origin": "slack",
"origin_provider": "string",
"origin_provider_display": "string",
"has_artifacts": true,
"archived_at": "string",
"created_at": "string",
"last_activity_at": "string",
"terminated_at": "string",
"rounds": [],
"events": [],
"steered": true,
"dispatched_run_id": "string"
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}