authorization=True enables JWT verification. AgentOS also needs a public key to verify tokens against. Generate one from the control plane and wire it in.
Generate a Verification Key from the Control Plane
Toggle JWT authorization
Enable JWT authorization when connecting a new AgentOS, or later from the OS Settings page.
The control plane only issues RS256 keys, which is also the default. See authorization troubleshooting for common setup issues.
Sending Authenticated Requests
Authenticated requests carry a verified caller identity. AgentOS uses this to enforce per-endpoint permissions, scope data to the caller, and audit who did what. Send the JWT in theAuthorization: Bearer <token> header:
- Control plane: minted by
os.agno.comand copied from the OS Settings page. - Self-hosted: minted by your backend or a third-party IDP. See Self-Hosted for setup.
401 Unauthorized. Requests whose JWT lacks the scopes the endpoint requires return 403 Forbidden.
Configurable Options
Configure JWT verification usingAuthorizationConfig:
Environment Variables
| Variable | Purpose |
|---|---|
JWT_VERIFICATION_KEY | Single public key or shared secret. Added to verification_keys. |
JWT_JWKS_FILE | Path to a static JWKS file. |
AuthorizationConfig. Pass keys in code, env vars, or both.
Excluded Routes
These routes are excluded from authorization checks by default:/, /health, /info, /docs, /redoc, /openapi.json, /docs/oauth2-redirect
Error Responses
| Status Code | Description |
|---|---|
401 Unauthorized | Missing or invalid JWT token |
403 Forbidden | Insufficient scopes for the requested operation |
Next Steps
| Task | Guide |
|---|---|
| Understand JWT claim structure | Tokens |
| Issue tokens from your own backend | Self-Hosted |
| See the full scope reference | Scopes |
| Assign roles to users | Roles |