
agno_pat_ service-account tokens instead of JWTs? See Service Accounts for their failure modes.
401 Unauthorized: algorithm mismatch
You see “Authorization Failed” on every request, consistently across machines. Cause: The algorithm configured onAuthorizationConfig does not match how the token was signed.
Fix: depends on your setup.
RS256, RS384, RS512, HS256, HS384, HS512, ES256, ES384, and ES512.
401 Unauthorized: PEM key may be mangled in env var
You see “Authorization Failed” on some machines but not others, even with the same verification key. Cause: Multi-line PEM keys can lose their newlines when passed through shell environment variables. Depending on your shell,.env loader, or how the key was pasted, the -----BEGIN PUBLIC KEY----- header, body, and footer may collapse onto one line, producing an unparseable key.
Fix: Save the key to a file and load it in code:
403 Forbidden: insufficient scopes
The token is valid but AgentOS returns403 on a specific endpoint.
Cause: The token’s scopes claim does not include the scope required by the endpoint. Unlike a 401, the token itself is fine.
Fix: Check the Scope Reference for which scope each endpoint needs. A few scopes act as gates in the AgentOS backend, and a token missing any of them fails before finer-grained checks run. See Access Prerequisites for the full list.
Both security key and JWT authorization enabled
You enabled both security key authentication and JWT authorization on the AgentOS Control Plane at the same time. Cause: Authorization takes precedence over security key authentication, so when both are enabled, security key requests fail. See security key authentication. Fix: depends on your AgentOS version.Before v2.3.13
The AgentOS Control Plane only supports security key authentication on these versions. Disable Authorization on the AgentOS Control Plane and continue using security key.v2.3.13 and later
Authorization (JWT verification) is preferred over security key authentication as it provides fine-grained RBAC permissions.