Adds context objects to the agent.
ReadonlychatThe chat that the session is associated with.
ReadonlyfeedThe feed carrying the chat's messages.
Gets the context objects from the agent.
ReadonlyrunningTrue while the agent is working on a turn (running, or waiting on a tool call or alarm); false when it is idle awaiting input, or terminal.
Submit a turn: a plain user prompt, or pre-built content blocks (e.g. synthetic context + prompt).
Subscribe to ephemeral trace events (e.g., streaming partial messages). Replays buffered events, then streams new ones until the process ends.
When forking a collector from a short-lived parent (e.g. useEffect +
runPromise(Effect.forEach(subscribe))), use Effect.forkDetach so the
stream survives after the parent scope closes; interrupt it on dispose.
Terminates the agent process and clears its durable storage.
Wait until agent has completed its work.
Handle to an agent session.