Modes
Cookies
Three cookies, with different scopes — worth understanding separately because they fail differently:session and sandbox_session can expire independently. A user with a valid session but a stale
sandbox_session reaches the console fine and then fails on anything that executes — which presents
as an agent error rather than an auth error. Check both when diagnosing.The flow
Response
Routes
Org scoping
Thesession JWT carries orgId, and downstream handlers check ownership against it — see
verify chat ownership in the agent
pipeline. Authentication establishes who; the orgId check establishes whose data.
Next steps
Console overview
What the console does with the session established here.
Agent pipeline
Where the orgId check is enforced.
Console mobile
The same auth, on a device that stores tokens differently.
Sandbox API
What sandbox_session grants access to.