Skip to main content
For concepts, see Sessions and Realms.
Rust examples use the runtime-backed SessionService path, which is the same canonical session lifecycle used by the other surfaces.

Create a session

Multi-turn

Resume by ID or alias

CLI supports short prefix matching and relative aliases for resuming sessions.

List sessions

Read session state

Archive a session

Interrupt a turn

Cancel an in-flight turn. No-op if the session is idle.

Event streaming

Model and provider selection

Config management

Realm selection

Realms scope sessions and config. Surfaces that share a realm_id see the same state. Realm is set at startup for server surfaces (RPC, REST, MCP) and per-command or per-connection for CLI and SDKs.

Next step