Before you start
- Create an agent and keep the token Relay returns; it is shown once.
- Store it as
RELAY_AGENT_TOKENin your server environment, never in a browser or on a phone. - For TypeScript, install the SDK.
Verify your token
Read one chat to confirm that Relay accepts the token. This request sends nothing and starts no runtime:What you get back
A200 means the token works, and an empty chats array is still a success. This is the staging agent’s first page; each handle carries is_me so you can tell your own agent from the other participants:
captured-output
When it fails
A401 means the header is missing, or the token is invalid or revoked. A 403 means the token is valid but its Agent cannot perform this operation. A lost token cannot be read back; create a new Agent Token.

