General
Authentication
The engine accepts four kinds of caller identity: a JWT bearer token, an API key, HTTP Basic credentials and no credentials at all (anonymous). All of them work on every surface — REST, Socket.IO, plain WebSocket and the HTTP pipeline channel.
Authentication only establishes who the caller is. What that caller may see and run in a project is decided by the authorization model documented in Consumer Security.
JWT Bearer Token
The engine is an OAuth2 resource server. Tokens are issued by the platform’s identity provider (Keycloak) and validated against its configured issuer.
Pass the token as a standard header:
Authorization: Bearer <token>
Because browsers and native socket libraries cannot always set headers on a WebSocket handshake, the token may also be passed as a query parameter on any endpoint:
/socket/pipeline/agent:acme-support?authorization=<token> /api/v2/project/acme?authorization=<token>
Roles are read from the token’s realm_access.roles claim and mapped to engine authorities.
The role vocabulary is:
| Role | Meaning |
|---|---|
|
End user of an agent. Required by the user-facing endpoints (sessions, memory, navigation, evaluation). |
|
May read session data and turn logs across users. |
|
Designs agents and projects. |
|
Read-only access. |
|
Owns a tenant or project. |
|
Full administrative access, including operational endpoints. |
Two further claims are consumed by the project authorization model:
idpRef (which identity provider authenticated the user) and extRoles
(external roles used for optional role-based project access).
See Consumer Security.
User Attributes
A user signed in through an external identity provider can carry attributes taken over from it, in
the extAttrs claim — an object keyed by attribute:
{
"idpRef": "csas",
"extAttrs": {
"jobTitle": "Branch Manager",
"department": "Retail"
}
}
Which attributes a user carries depends on how the identity provider is connected; jobTitle and
department are the common ones. A key starts with a letter and has at most 64 letters, digits, _
or -; other keys are ignored, as are blank values, and at most 32 attributes are kept. A value is a
string with its whitespace collapsed and cut to 256 characters. A token with the claim replaces the
attributes the engine keeps for the user — an attribute it leaves out is removed. A token without
extAttrs whose scope claim lists ext-attrs means the user has no attributes left and clears them;
any other token without the claim leaves them as they are. Projects use the attributes in agent instructions and in
navigation conditions (see Entry State).
API Key
Server-to-server integrations can authenticate with a pre-shared API key, supplied either as a header or as a query parameter:
X-Api-Key: <key>
/api/session?apiKey=<key>
Each key is configured on the engine side with a fixed set of roles, and can be disabled without
being removed. A request carrying an unknown or disabled key is rejected with 401 Unauthorized
— note that this differs from sending no key at all, which is treated as an anonymous request.
HTTP Basic
Authorization: Basic <base64(user:password)> is accepted on REST endpoints and on the Socket.IO
handshake. A Basic identity may carry an associated idpRef, which participates in identity
provider matching exactly like the JWT claim. On REST endpoints, credentials that do not match a
Basic identity are rejected with 401 Unauthorized.
Anonymous Access
Requests without credentials are permitted. The engine does not reject them at the transport level; individual endpoints and projects decide what an anonymous caller may do:
-
GET /api/v2/project/{idOrRef}returns project metadata to anonymous callers, and the full agent list only when the project does not require identity. -
A conversation can be opened anonymously when the project allows it. The user identity is then derived from the device (
deviceRef) rather than from an account, which means memory and history do not carry over to another device. -
Passing
anonymousMode=trueon a conversation makes the session anonymous even when the caller is authenticated — the session is bound to an anonymous user derived from the session ID.
Which Endpoints Require What
| Endpoint group | Minimum identity |
|---|---|
None (response content depends on identity) |
|
|
|
User, memory and navigation |
|
None for |
|
|
|
None for visual assets |
|
|
|
Conversation transports |
None; project rules decide (see Consumer Security) |