ApiSessions
Get Session State
Return the session's current state snapshot.
Return the session's current state snapshot.
The shape matches the agent version's state schema (see
GET /agents/{id}/versions/{version}/state-schema). Useful for inspecting the
agent's running state — e.g., to read the latest values before sending the next
turn.
Returns 409 if the session has no pinned agent version, or if the version is no longer available.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
session_id*Session Id
Format
uuidHeader Parameters
X-API-Key?string|null
Response Body
application/json
application/json
curl -X GET "https://api.levainlabs.com/api/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/state"{
"state": {}
}Empty
Empty
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Empty