Obtaining an access token
Use the login endpoint to exchange your credentials for a signed JWT:token value — you’ll include it in every subsequent request.
The exact authentication provider (local credentials, OAuth2 SSO) depends on your deployment configuration. Contact your platform administrator if you’re unsure which login method is configured.
Authenticating API requests
Include the token as a Bearer credential in theAuthorization header of every request:
Associating runs with a user and organization
When submitting a run, includeuserId and orgId in the request body to associate the run with a specific user and organization. This is how session history, memories, and knowledge base access are scoped:
Authenticating SSE streaming connections
BrowserEventSource connections cannot send Authorization headers. Agent Manager handles this by issuing short-lived opaque SSE tokens that you pass as a query parameter.
1
Request an SSE token
Exchange your JWT for a short-lived SSE token scoped to a specific run:
2
Open the SSE connection
Pass the token as a query parameter when opening the event stream:
Common authentication errors
Registering a new user
If your deployment uses local credential management, new accounts can be registered via:POST /api/auth/login to obtain your token.