Site token
The site token opens the public door. It sits in your page’s HTML, so anyone can read it. That is expected: it only reaches data you marked public, from origins you allowed.- Open the assistant, then the Doors tab.
- Turn the public door on.
- Copy the snippet. The
site-tokenattribute holds the token.
The site token alone does not protect anything. What limits the public door is its scope (public tables, shared rows), the allowed origins, and the rate and spending caps.
Assistant ID
Your server needs it to open sessions and to read or erase conversations.- Open the assistant.
- Open the Integration tab. The server snippet carries the assistant ID.
/assistants/<id>.
API key
The API key commits your workspace. Treat it like a password.- Open Settings → Developers → API keys.
- Create a key. Only the workspace owner can.
- Copy it once, and store it in an environment variable on your server.
.env
Partition dimensions
The per-user door also needs the partition keys of your assistant: the columns that say whose data a row is, such ascustomer_id. They are set when you sign the assistant’s isolation, in the Isolation tab.
Your server must send exactly those keys when it opens a session. See Per-user door.