Skip to main content
A session holds the agent’s conversation and can reuse its live browser. One session ID can contain multiple runs. Every run creates a session implicitly unless you pass an existing session ID. One session ID containing three sequential runs, where each run continues the same conversation, workspace, and live browser One session ID containing three sequential runs, where each run continues the same conversation, workspace, and live browser Pass session_id / sessionId to continue:
Omit the session ID for a new conversation. Pass only a workspace ID when you want a fresh conversation that keeps the same files.

Follow up while a run is busy

Use the session queue to send the next instruction without interrupting the active run. The response is a queued message, not a run: its runId can be null until dispatch. Keep its message ID and poll that message before waiting for the resulting run. Do not resend the message to poll it.
This example times out only its local wait. It does not remove the queued message or cancel a run. interrupt=True / interrupt: true instead cancels the active run so the new instruction can run immediately. Keep it false to preserve the active work.