Skip to main content
A session is one live conversation with an agent. Each session has its own memory and its own event stream.

Create one

Get a reply

result() resolves on the first terminal event.

Stream the events

Multi-turn

A session keeps state between sends:

Fork

Snapshot a session and continue both branches independently:

Resume

Reconnect to a session and replay missed events:
Recent events are kept around for replay — any practical reconnect window is covered.

Abort

Cancels the in-flight model call and emits session.aborted.

Terminal guarantee

Every session reaches a terminal event (session.completed, session.completed_degraded, or session.aborted). Consumers never hang. See Events for the full vocabulary.