Session Details
Use session.get_info() to read title, preview, model, and execution state
Session Details
session.get_info() returns a lightweight detail snapshot for the current Session. It is for headers, title bars, and current state; it does not replace messages().
const info = await session.get_info();
render_header({
title: info.title || info.session_id,
preview: info.preview_text,
is_running: info.executing === true,
model: info.model_label,
});Common fields
| Field | Meaning |
|---|---|
agent_id / session_id | Stable ownership and identity |
title | An optional persisted title |
preview_text | Recent text preview for lists |
message_count | Number of persisted Messages |
model_label | Runtime model label inferred for observability |
created_at / updated_at | Timestamps in milliseconds |
executing | Whether a Turn is currently active |
timezone | Reference timezone recorded when the Session was created |
get_info() does not return complete history or current streaming text. Use messages() for content and subscribe() for live state.
Actual title semantics
After the first user message, the SDK tries to generate and persist a title with the currently available model. If no model is available or generation fails, the title may remain empty; the SDK does not guarantee a fallback from the first user message.
The UI must fall back to session_id, preview_text, or its own new-conversation label when title is empty. A title update is published live as variant: "session", type: "title".
List versus detail
- Sidebar: use
agent.sessions.list()instead of callingget_info()for every item. - Selected Session: use
get_info()to refresh header and execution state. - Content area: load history with
messages()and keep it synchronized withsubscribe().
Do not infer execution from updated_at; a timestamp indicates recent persistence, not an active Turn.