Get the agent's enriched session view
const url = 'https://your-org.evershell.ai/v1/workspaces/example/session';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”OK
object
Example generated
{}Workspace is not running — workspace_stopped,
workspace_failed, or workspace_provisioning.
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}Agent service unreachable (agent_unreachable).
object
object
Closed-enum slug (e.g. permission_denied, validation_error, workspace_not_found)
Human-readable summary
Server-generated request id for correlating logs
Optional structured context. Validation errors land at
details.fields as a per-field map.
object
Example
{ "error": { "code": "permission_denied", "message": "caller lacks required scope", "request_id": "7f3a9c2e" }}