List Sessions
/agent/v1/sessions◐ PartialOfficial Claude documentation ↗
Request parameters
agent_idstringoptionalquery: Return only sessions created with this agent id (from agents.list or agents.create). Pass deployment_id as well to narrow the originating deployment.
agent_versionnumberoptionalquery: Filter by agent version; only applies when agent_id is also set.
created_at[gt]stringoptionalquery: Exclusive created-at lower bound for sessions. Declared by the Managed Agents shape but not supported here; sending it returns 400.
created_at[gte]stringoptionalquery: Created-at lower bound for sessions. Declared by the Managed Agents shape but not supported here: sessions.list honors only limit, page, agent_id, deployment_id and include_archived, and other filters return 400.
created_at[lt]stringoptionalquery: Exclusive created-at upper bound for sessions. Declared by the Managed Agents shape but not supported here; sending it returns 400.
created_at[lte]stringoptionalquery: Created-at upper bound for sessions. Declared by the Managed Agents shape but not supported here: sessions.list honors only limit, page, agent_id, deployment_id and include_archived, and other filters return 400.
deployment_idstringoptionalquery: Return only sessions created by this deployment id (depl_...), returned by deployments.create or deployments.list.
include_archivedbooleanoptionalquery: Whether archived sessions are listed: true includes them, false (the default) hides them. A value other than true or false returns 400. Archived sessions stay retrievable by id either way.
memory_store_idstringoptionalquery: Declared by the Managed Agents shape but not supported by sessions.list; sending it returns 400.
orderstringoptionalquery: Order by creation time: asc oldest first, desc newest first (default).
More parameters (5)
statusesarrayoptionalquery: Filter by session status; repeat the parameter to match several.
limitnumberoptionalquery: Number of items per page.
pagestringoptionalquery: Opaque pagination cursor: pass the next_page value of the previous response unchanged. Omit it for the first page. A cursor from a different query or a malformed one returns 400.
external_user_idstringoptionalquery: Filter by an exact end-user identifier (1–128 characters: A-Z, a-z, 0-9, underscore, dot, colon, at sign or hyphen). Keep this filter unchanged when following page.
sourcestringoptionalquery: Filter by session origin: kit, iframe, hosted, api or automation. Keep this filter unchanged when following page.
Returns
200
Supports limit, page, agent_id, deployment_id and include_archived (default false, so archived sessions are hidden unless you pass true). agent_version, time ranges, memory_store_id, order and statuses are not supported and return 400.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Request
curl
curl https://api.deepraxis.com/agent/v1/sessions \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
f"{opts['base_url']}/v1/sessions",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/sessions`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());Response 200
{
"data": [
{
"id": "sesn_c9b6077486644badbfc0694a2d224abc",
"type": "session",
"agent": {
"id": "agent_7838e080-8ac6-471d-887c-a7595de1afcb",
"type": "agent",
"name": "文档助手(已更新)",
"description": null,
"system": "用一句话简短回答。",
"model": {
"id": "deepseek-flash"
},
"version": 2,
"tools": [],
"skills": [],
"mcp_servers": [],
"multiagent": null
},
"environment_id": "env_deepraxis_text_v1",
"time_zone": "UTC",
"title": "文档测试",
"metadata": {},
"created_at": "2026-09-29T08:30:16.285Z",
"updated_at": "2026-09-29T08:30:18.412Z",
"archived_at": null,
"status": "idle",
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_read_input_tokens": 0,
"list_cost": null
},
"stats": {},
"budget": null,
"resources": [],
"vault_ids": [],
"outcome_evaluations": [],
"deployment_id": null
}
],
"next_page": null,
"prev_page": null
}Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | Items of this page, in the order requested by the call. |
| data[].id | string | Session id (sesn_...). Pass it as session_id in every session call. |
| data[].agent | object | Resolved agent definition for a session. Snapshot of the agent at session creation time. |
| data[].archived_at | null | string | A timestamp in RFC 3339 format |
| data[].budget | null | object | A hard spend ceiling. The session stops issuing new model requests once the tracked list cost reaches max_list_cost. |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].environment_id | string | Execution environment of this session. A service session created without environment_id uses the default environment saved in the agent version (light for a new agent); null means it was created without a machine; Computer sessions may omit this field. |
| data[].metadata | object | Free-form string key/value pairs stored with the session, changed through sessions.update patch semantics. |
| data[].outcome_evaluations | array<object> | Per-outcome evaluation state. One entry per define_outcome event sent to the session. |
| data[].resources | array<object> | Resources attached to the session, at most 500; each is a file reference mounted into the session's machine. |
| data[].stats | object | Timing statistics for a session. |
| data[].status | string | SessionStatus enum - rescheduling - Transient error occurred, retrying automatically. - running - Agent is actively executing. - idle - Agent is waiting for input, including user messages or tool confirmations. Sessions start in idle. - terminated - Session has ended, either due to an error or completion. |
| data[].title | null | string | Title of the session, set on create or through sessions.update; null when none was set. |
| data[].type | string | Always session. A session, one conversation of an agent on a machine. |
| data[].updated_at | string | A timestamp in RFC 3339 format |
| data[].usage | object | Cumulative token usage for a session across all turns. |
| data[].vault_ids | array<string> | Vault IDs attached to the session at creation. Empty when no vaults were supplied. |
| data[].deployment_id | null | string | Deployment ID when the session was created from a deployment reference. Null otherwise. |
| data[].cwd | string | Normalized session working directory; defaults to /home/user/workspace. Forks inherit this directory. |
| data[].workspace | object | Praxis extension: where this session's work happens. shared and isolated are the two kinds; an isolated session also names its path and branch. |
| data[].computer_id | string | Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected. |
| data[].model | object | Praxis extension: the currently selected session model. |
| data[].thinking | object | null | Praxis extension: explicit session thinking effort; null inherits the pinned agent default, then the model default. none disables thinking only when model.thinking.can_disable is true. Unsupported efforts return 400 invalid_request_error. |
| data[].forked_from | object | null | Praxis extension: source of a forked session; null for other sessions. Available only on /agent/v1. |
| data[].external_user_id | string | null | End-user identifier associated with the session, or null when none is recorded. Own-face extension; use external_user_id on sessions.list to find this user's sessions. |
| data[].source | string | null | Origin of the session: kit, iframe, hosted, api or automation; null when unavailable. Own-face extension; use source on sessions.list to filter by origin. |
| next_page | string | null | Opaque cursor for the next page: pass it unchanged as page to continue. Null when this is the last page. |