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.
A managed session's state is the recipe's internals, so it follows the timeline and log surfaces: an org-scoped key — or an admin — of the org that published the recipe reads it, everyone else gets 404.
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": {}
}