Chat Sessions
app.chat(message) stores the returned session_id and resends it on the next call.
Multi-turn works with no bookkeeping from you.
app.chat("My name is Alex.")
print(app.chat("What is my name?").response) # knows it's Alex
ChatResponse
| Field | |
|---|---|
response | The reply. |
session_id | Current session, or None before the first message. |
retrieved_contexts | Data-source chunks used, if any. |
structured_output | Present when the agent has a response_schema. |
selected_agent, handoff_path | Squad routing detail. |
raw_payload | Unmodified API response. |
Reset
app.reset_session() # next message starts fresh
Helpers
app.session().ask("Summarize the handbook.") # returns a ChatResponse
app.chat() # interactive terminal chat; "exit" to quit
Session state lives on the App instance — a new App starts clean.