Skip to content
Select themeSelect language

get_api_agent_sessions

GET
/api/agent-sessions
curl --request GET \
--url https://example.com/api/agent-sessions \
--cookie supacloud_session=<supacloud_session>

The workspace’s active sessions, most recently seen first.

Media typeapplication/json

A {items: […]} page of the workspace’s active sessions.

object
items
required
Array<object>

One live session as the wire sees it. status is the canonical token of the row’s typed lens, so the wire vocabulary has a single source.

object
capabilities
required

Advertised capabilities ([] means “not advertised”). A JSON array of free-form strings, so the field is a real Vec — a scalar Value would publish type: object no matter the annotation, and a generated client would then reject the real [].

Array<object>
object
harness
required
string
id
required
string format: uuid
last_seen_at
required
string format: date-time
registered_at
required
string format: date-time
run_id
required

The execution this session belongs to. Always present (migration 399): a session is one live run, not a run-agnostic registration.

string format: uuid
status
required
string
task_id
required
string format: uuid
Examplegenerated
{
"items": [
{
"capabilities": [
{}
],
"harness": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"last_seen_at": "2026-04-15T12:00:00Z",
"registered_at": "2026-04-15T12:00:00Z",
"run_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "example",
"task_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
]
}

Structured client error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Permission denied

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden license_required license_expired bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited too_many_requests quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}