Skip to content

Get the agent's enriched session view

GET
/workspaces/{id}/session
curl --request GET \
--url https://your-org.evershell.ai/v1/workspaces/example/session \
--header 'Authorization: Bearer <token>'

Permissions: workspace:read or workspace:read:own (creator-match on :own).

Proxied through to the agent service running in the workspace pod. Returns the agent’s current session state — task history, iteration counters, context window usage. Requires the workspace to be running (idle or busy); non-running states return 409 with one of workspace_stopped, workspace_failed, or workspace_provisioning.

Response shape is owned by the agent contract and may evolve independently of the CP — treat it as opaque, key off the documented fields only.

id
required
string

OK

Media type application/json
object
key
additional properties
any
Example generated
{}

Workspace is not running — workspace_stopped, workspace_failed, or workspace_provisioning.

Media type application/json
object
error
required
object
code
required

Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)

string
message
required

Human-readable summary

string
request_id
required

Server-generated request id for correlating logs

string
details

Optional structured context. Validation errors land at details.fields as a per-field map.

object
key
additional properties
any
Example
{
"error": {
"code": "permission_denied",
"message": "caller lacks required scope",
"request_id": "7f3a9c2e"
}
}

Agent service unreachable (agent_unreachable).

Media type application/json
object
error
required
object
code
required

Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)

string
message
required

Human-readable summary

string
request_id
required

Server-generated request id for correlating logs

string
details

Optional structured context. Validation errors land at details.fields as a per-field map.

object
key
additional properties
any
Example
{
"error": {
"code": "permission_denied",
"message": "caller lacks required scope",
"request_id": "7f3a9c2e"
}
}