Skip to main content
client.run(...) is one-shot — each call is an independent conversation. Open a session to keep context across turns: every run on it reuses one conversation, so the agent remembers earlier turns.
Leaving the with block ends the session; the conversation persists server-side (hidden from the app) until you delete() it — or open it with ephemeral=True to delete on close. client.chats() lists what your scripts left behind.

Guide: multi-turn sessions

Entry agent vs. following a handoff, persistence, and cleanup.