Create a session
POST /v0/envs/{env}/sessions
string
The end user the conversation is about: 1–200 letters, digits and
. _ : @ -. Optional; it can’t be changed later. Without it (or without a body) the session has no end user.Run a turn
Pass thesession_id when you start a run. The run is the session’s next turn:
- One turn at a time. Starting a turn while another turn of the session is queued or running is a
409 session_busy. A turn that isheldfor a person doesn’t block the next one. - The end user travels with every run. Each run of the session has the session’s
user(in the run, and in the body the agent receives); a child run keeps its parent’s. - A session can hold runs of different agents and capabilities of the environment; its session-scoped state is kept per agent.
- A
session_idthat isn’t yours (and you aren’t an admin) is a422on the run’s start, as if it didn’t exist. - Sessions don’t end or expire.
Get a session
GET /v0/envs/{env}/sessions/{session_id}
The session and its runs (its turns), oldest first. Each run has the shape of the run object.
404 unless you are an admin of the environment.
Find an end user’s runs
Every run carries its end user, so you can list one person’s runs of an agent with theuser filter:

