Authorization: Bearer <token> header on every request. Tokens can come from the AgentOS control plane or your own backend.
Token Structure
Your JWT tokens should include:| Claim | Required | Description |
|---|---|---|
scopes | Yes | Array of permission scopes |
sub | No | User ID (extracted as user_id) |
session_id | No | Session ID for session tracking |
aud | No | Audience (must match AgentOS id when verify_audience=True) |
exp | No | Expiry timestamp. Recommended; expired tokens are rejected. |
iat | No | Issued-at timestamp. |
Example Tokens
Read-only access:Sending Tokens
Send the token in theAuthorization header:
Next Steps
| Task | Guide |
|---|---|
| Issue tokens from your own backend | Self-Hosted |
| See the full scope reference | Scopes |
| Configure JWT middleware directly | JWT Middleware |