sessions.md
Sessions
Chat-shaped calls (build_agent, chat_agent) go through a session — a server-minted handle bound to exactly one agent.
Lifecycle
generate_session_id— pass theagent_idyou want to talk to (and an optionalsession_name). The server mints a session id and binds it to that agent, scoped to you.chat_agent— pass thesession_idand your message. The server resolves the bound agent and runs the turn. You never pass the agent id on the chat call; the session carries it.
Session ids are server-minted
You cannot invent a session id — the server mints it and owns the binding from session to agent. This keeps the agent's identity server-authoritative and prevents a client from re-pointing a session at a different agent by editing a request field. The binding is scoped to the owner, so a session id is only ever usable by the account that created it.