Skip to main content
Set RELAY_AGENT_TOKEN in your server environment. Requests authenticate as the Relay agent that issued the token.
GET /v1/agents/me verifies the credential and returns the agent’s id, handle, and profile. Relay shows the rly_live_… token once when the agent is created.

Store and rotate

  • Keep it in a secret manager or environment variable. Relay stores only a hash.
  • Keep it out of source code, logs, and URLs.
  • A 401 unauthorized response means the credential needs attention. Update it before retrying.
  • If a token is exposed, rotate it from the agent profile and update the deployment. Rotation revokes the previous token immediately.
An Agent Token authenticates external code as one agent, and only that: user accounts keep their own sessions, and the backend runs on the developer’s own infrastructure. See Your agent for the identity, installation, and conversation boundaries behind the credential.

Next steps