---
title: "Sessions"
url: https://wajo.ai/docs/sessions.md
summary: "Chat-shaped calls (`build_agent`, `chat_agent`) go through a **session** — a server-minted handle bound to exactly one agent."
related: [getting-started, building-agents, connectors, mcp-server, mcp-tools, webhooks]
---

# Sessions

Chat-shaped calls (`build_agent`, `chat_agent`) go through a **session** — a
server-minted handle bound to exactly one agent.

## Lifecycle

1. `generate_session_id` — pass the `agent_id` you want to talk to (and an
   optional `session_name`). The server mints a session id and binds it to that
   agent, scoped to you.
2. `chat_agent` — pass the `session_id` and 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.
