Identity for teams that read the docs first.
Algebrix Identity is a standards-based authentication and user management platform. This document covers everything needed to integrate sign-in, single sign-on, multi-factor authentication, programmatic management of users, sessions, invitations, and the audit trail, and verifiable, governed identities for AI agents.
01 Overview
Algebrix Identity handles the parts of authentication that are expensive to build and dangerous to get wrong: credential storage, session management, multi-factor enrolment, token issuance, and an auditable record of administrative change.
The platform implements OAuth 2.0 and OpenID Connect as published. There is no proprietary SDK requirement and no custom handshake. Any conformant OIDC client library works against it, so integration effort is measured in configuration rather than in code, and migrating away is a matter of repointing an authority URL.
What this version covers
- Sign-in for single-page, native or mobile, and server-side web applications, using the authorization code flow
- Machine-to-machine access to your own services using the client credentials grant
- Single sign-on across every application in one organization
- Time-based one-time password (TOTP) multi-factor authentication, enforceable for administrators or for everyone
- Self-service applications created from four templates, with an integration view for each
- A management API for users, roles, required actions, password reset emails, invitations, CSV import and export, sessions, sign-in branding, the audit log, and sign-in activity
- Configurable sign-in security: password policy, brute-force protection, session and token lifetimes
- AI agent identities and governance: a verifiable identity per agent and per customer, narrow-only mandates, risk tiers, customer acceptance, human approval of sensitive actions, agents acting for users, key rotation and periodic review, a three-level kill switch, and tamper-evident records with signed, independently verifiable evidence packs (sections 07 and 08)
- A hosted administration console for every organization, requiring no build effort of your own
Integration requires an organization. Create one at https://identity.algebrix.co/signup. You choose an identifier, the platform provisions the organization, and you create the applications you need from templates in the console. Section 03 covers signup and section 06 takes you from there to a first authenticated call. If you prefer to start from working code, section 06 also lists runnable sample applications for each application type. If you are giving AI agents access to APIs, start with section 07.
Every example in this document uses {organization} as a placeholder for the identifier you choose.
The hosted console
There are two sign-in addresses for the console, one for each kind of administrator:
| Address | Who signs in there |
|---|---|
https://identity.algebrix.co | Account administrators. They manage the account: its organizations, subscription, and usage, plus their own profile, password, and multi-factor enrolment. They can also administer every organization in the account. |
https://identity.algebrix.co/{organization} | Organization administrators, meaning users of that organization who hold the admin role. |
In the console, administrators can do the following:
- Manage users, roles, invitations, and sessions.
- Create and configure applications.
- Set authentication policy.
- Upload a sign-in logo.
- Review the audit log and sign-in activity.
- Register, scope, and govern AI agents (account administrators).
- See usage against the plan.
The management API in section 10 covers user-facing operations programmatically. Automate what you want and leave the rest to the console.
02 Core concepts
Accounts, organizations, applications, users
| Concept | What it is |
|---|---|
| Account | The commercial entity that holds the subscription. Plan allowances belong to the account and are shared across all of its organizations. A billing restriction on the account applies to every organization in it. |
| Organization | The isolation boundary. Users, credentials, sessions, roles, signing keys, and audit records belong to exactly one organization and are invisible to every other. Addressed by a permanent identifier. |
| Application | A client registered in an organization, created from one of four templates. It has a client ID, and a secret if it is confidential. See section 04. |
| User | A person in an organization's directory. They hold exactly one role: admin, manager, or end-user. |
| Agent class | An AI agent product registered at account level, with a passport, a risk tier, a class policy, and a named owner. See section 07. |
| Agent instance | One deployment of an agent class in one organization, with its own credential and mandate. It is not an application: it never appears in the Applications list or counts toward the applications allowance. |
| Mandate | What an agent instance's tokens may carry: scopes, which of them need human approval, audiences, lifetime, and whether the agent may act for users. It is always narrower than the class policy, and versioned. |
Roles
| Role | Grants |
|---|---|
admin | Access to the organization console and to every endpoint under /api/admin |
manager | An application-level role for your own authorization decisions. It carries no access to the management API. |
end-user | Standard access. No management API access. |
Roles are exclusive: assigning one replaces the previous one.
Two surfaces
Algebrix Identity exposes two separate HTTP surfaces. They serve different purposes and are scoped differently. Confusing them is the most common cause of a failed first integration.
Token issuance, sign-in, sign-out, key publication. Every path carries an organization segment, and the segment is mandatory.
Administration of users, sessions, invitations, branding, and the audit trail. The organization is read from the access token, and every operation is scoped to it.
On the identity surface you state the organization, in the URL. On the management surface you do not: it is derived from the iss claim of the token you present, and every read and write is confined to that organization before any handler runs. There is no organization parameter to pass, and no way to reach another organization's data by changing one.
The same base URL, paths, and code serve every organization you run. Which organization you act on is decided entirely by which token you send.
One exception carries an identifier in the path: the anonymous public endpoint under /api/public/organizations/{organization}, which returns only a sign-in logo. It does not weaken the scoping guarantee, because it exposes nothing beyond a public image. See section 10.
Which credential reaches what
| Credential | Reaches |
|---|---|
A signed-in user holding admin, through any application in the organization | Every endpoint under /api/admin documented in section 10, for that organization only |
A signed-in user holding manager or end-user | No management endpoint. Calls return 403. |
| A machine-to-machine application (client credentials) | No management endpoint in this version. Calls return 403. Machine tokens are for your own services. |
| An account administrator | The console, including account-level operations: organizations, billing, usage, and entitlements. These operations are console-only in this version. An organization token, whatever its role, is refused on them with 403. |
| An agent instance (client credentials with a signed assertion or secret) | The APIs named in its mandate, which validate its token themselves, and the agent approval endpoint (section 08). Agent tokens are not a way to call the management API, and agents are managed only in the console. |
How a request flows
Your application never handles user credentials. The browser is redirected to the identity surface, the user authenticates there, and your application receives an authorization code, which it exchanges for tokens. Calls to the management surface carry the resulting access token as a bearer credential. The platform validates its signature against the organization's published key set before any handler runs.
03 Getting started
Signup
Signup at https://identity.algebrix.co/signup begins with the organization identifier. Because the identifier is permanent, decide on it before you start. There are two paths:
| Path | What happens |
|---|---|
| Free | You choose an identifier and give an email address. The identifier is reserved for 24 hours and a verification email is sent. Nothing else is created until you verify. After you verify, the account and organization are provisioned and you set your password directly. No second email is sent. |
| Paid | You choose an identifier. It is reserved for 30 minutes while you complete payment details. If the reservation lapses first, the identifier returns to the pool. Nothing is created until payment details are accepted. |
Payment details are handled entirely by Stripe. Card numbers never reach Algebrix systems.
Identifier format
| Property | Value |
|---|---|
| Pattern | [a-z][a-z0-9-]{2,39} |
| Length | 3 to 40 characters |
| Case | Lowercase only. Requests using uppercase are not matched. |
| Reserved | Infrastructure hostnames, the Algebrix brand, master, and the console's own route names are refused |
| Mutability | Permanent once issued |
The identifier is embedded in the iss claim of every token the platform signs. Changing it would invalidate every token already issued and break every application configured against it. Treat it with the same permanence as a domain name.
If an organization is deleted, its identifier is never released to another account. Only the account that owned it can claim it again. This means a client still configured against the old issuer can never present credentials to a different customer.
Two behaviours to expect
Identifiers are case-sensitive. A request to /ACME-CORP/oauth2/keys returns 404, while /acme-corp/oauth2/keys succeeds. If a first attempt returns 404 on every endpoint, check the case of the identifier first.
An unknown identifier still returns a discovery document. Discovery for an organization that does not exist returns 200, because the platform does not confirm or deny which organizations exist. The endpoints inside that document return 404. If discovery succeeds but every later call fails, the identifier is misspelled.
What arrives with an organization
A new organization contains no customer applications. You create the applications you need from templates in the console (section 04).
The organization also holds one platform-managed application, which the hosted console uses to sign administrators in. It is not listed in the console, cannot be edited or deleted, and must not be used by your own applications.
Organizations created from this version onward enforce the Medium password policy and have brute-force protection off. Section 14 covers both settings.
More organizations, and deleting one
Account administrators can create further organizations from the console, up to the plan's organization allowance (section 13). At the allowance, creation is refused with a 409 that names the plan which lifts it.
Deletion is also driven from the console by an account administrator.
- It is a hard delete. The organization's users, applications, sessions, and settings are removed, and so are its audit records and sign-in activity. Its active-user figures for the current period are removed too. If you have retention obligations, export the audit log first (section 10).
- The last organization in an account cannot be deleted. To leave a paid plan, cancel the subscription instead.
04 Applications
An application is a client that signs users in, or that authenticates as itself. You create applications in the console from four templates. Each template fixes the grant, whether the application is confidential, and which addresses it accepts, so you choose a template rather than configuring raw client settings.
| Template | Type | Grant | Secret | PKCE |
|---|---|---|---|---|
| Single-page app | Public | Authorization code | None | Required, S256 only |
| Native or mobile app | Public | Authorization code | None | Required, S256 only |
| Server-side web app | Confidential | Authorization code | Yes | Optional, recommended |
| Machine-to-machine | Confidential | Client credentials | Yes | Not applicable |
Sign-in redirect URIs
The redirect URI in an authorization request must match an address registered on the application, including scheme and port.
| Template | Accepted addresses |
|---|---|
| Single-page, server-side web | https:// addresses. http:// is accepted only for localhost and 127.0.0.1, for development. |
| Native or mobile | A custom scheme such as com.example.app://callback, or a loopback address such as http://127.0.0.1:8080/callback. https:// is refused, because a native application cannot receive an https redirect. A custom scheme starts with a letter and contains only letters, digits, +, - and .. |
| Machine-to-machine | None. The application never sends anyone to a browser. |
The same rules apply to every template:
- Wildcards may appear in the path only, never in the host. For example,
https://app.example.com/*is accepted andhttps://*.example.com/cbis refused. - The value
+on its own is reserved and refused. A+inside a path is accepted. - Empty values, values containing spaces, addresses with no host, and duplicates are refused.
- A list holds at most 20 addresses.
- There is no separate post-logout list. A post-logout redirect must be one of the application's sign-in redirect URIs. Register your signed-out landing page, for example your home page, as an additional sign-in redirect URI alongside your callback.
Each refusal names the rule, for example: Sign-in redirect URIs: 'https://*.example.com/cb' is not allowed. A wildcard may only appear in the path, never in the address itself.
Allowed origins
Only single-page applications have allowed origins, which are used for cross-origin requests to the identity surface. Each origin is a bare origin with no path, such as https://app.example.com. A list holds at most 20 origins. Server-side web and machine-to-machine applications do not accept origins.
Lifecycle
- The client ID is derived from the display name at creation and is permanent. For example, "Billing Portal" becomes
billing-portal. The display name can be changed at any time; the client ID cannot. Always read the client ID from the console, not from a naming pattern. - Secrets can be revealed and rotated in the console. Rotating a secret invalidates the previous one immediately. There is no period in which both are valid. Requests made with the old secret fail with
unauthorized_clientuntil every deployment uses the new one, so plan rotation for a maintenance window. - An application can be deactivated.
- Deleting an application is permanent and ends its active sessions. The console shows the number of affected sessions before you confirm.
- Every application counts against the account's application allowance, machine-to-machine applications included (section 13).
Integration view
Each application has an integration view in the console. It shows the discovery URL, the exact issuer value to use as the authority, the client ID, and copy-ready curl and JavaScript snippets with your organization filled in. It is the quickest way to configure a client library.
In this version, creating, configuring, and deleting applications, and revealing or rotating their secrets, are console operations. There is no published API for them.
05 Authentication and tokens
Grants
| Grant | Use when | Acts as |
|---|---|---|
authorization_code | A person signs in through a browser or a native app. Used by single-page, native or mobile, and server-side web applications. | The signed-in user |
client_credentials | A backend service acts on its own behalf with no user present, and calls your own APIs. Used by machine-to-machine applications, and by agent instances (section 08). | The application |
refresh_token | Renewing an access token without sending the user back through sign-in. | The original user |
urn:openid:params:grant-type:ciba | An agent collects a token for an approval-required scope after a person approves it (section 08). Agents only. | The agent |
urn:ietf:params:oauth:grant-type:token-exchange | An agent exchanges a signed-in user's token for a delegated token (section 08). Agents only. | The user, through the agent |
To reach the management API, a token must be a user token carrying the admin role in realm_access.roles. The user can be signed in through any application in your organization. The management API checks the issuer, signature, expiry, and role. It does not check which application the token was issued to. Machine tokens are refused with 403, and agent tokens are not intended for the management API.
Configuring an OIDC client library
Most libraries need only an authority and a client ID, and discover everything else. The discovery document is at:
GET https://auth.algebrix.co/{organization}/.well-known/openid-configuration
Libraries that enforce strict OpenID Connect Discovery validation compare the issuer field of that document with the authority they were configured with, and refuse to start if the two differ. Configure these libraries with the exact published issuer value, which is also shown in each application's integration view:
// issuer value, use verbatim as the authority
https://auth.algebrix.co/realms/{organization}
Libraries differ here. Some accept the path form as an authority, and others, such as openid-client and angular-auth-oidc-client, refuse it with an issuer mismatch. The exact issuer value works with every library, so use it as the authority. Discovery returns the same document from either form, and the endpoints it lists are the documented /{organization}/oauth2/… paths.
Libraries in common use
The platform works with any conformant OIDC library. There is nothing to install from Algebrix. These are widely used and actively maintained:
| Platform | Library |
|---|---|
| Angular | angular-auth-oidc-client |
| React | react-oidc-context, which wraps oidc-client-ts |
| Vue and plain JavaScript | oidc-client-ts |
| Node.js | openid-client |
| .NET | Microsoft.AspNetCore.Authentication.OpenIdConnect |
| Java and Spring | Spring Security OAuth2 Client |
| Python | Authlib |
| iOS and Android | AppAuth |
Scopes
Request openid profile email. Other scopes advertised in the discovery document are not covered by support. See the note in section 09.
Client authentication
Confidential applications authenticate at the token endpoint with client_secret_basic (HTTP Basic) or client_secret_post (credentials in the form body). Both are accepted. Keep the secret server-side and out of source control.
Agent instances authenticate differently: with a signed assertion (private_key_jwt, RFC 7523), signed by a private key that never leaves your runtime. Low tier agents may use a secret instead. See section 08.
Token claims
Access tokens are RS256-signed JWTs. Validate them against the key set published at the keys endpoint, and never trust an unverified token. Claims relevant to integration:
| Claim | Meaning |
|---|---|
iss | Issuer, https://auth.algebrix.co/realms/{organization}. This is the only claim that identifies the organization, and the management API reads it to scope every call. |
sub | Stable, permanent identifier of the user, or of the machine application's service identity. Use it as the foreign key in your own database, never the email address or username. |
azp | The client ID of the application the token was issued to |
aud | Always account on user and machine-to-machine tokens, whatever application issued them. Do not use it to tell applications apart; use azp. Agent tokens are the exception: their aud names the APIs in the agent's mandate (section 08). |
exp, iat | Expiry and issue time, as Unix timestamps |
sid | The session the token was issued from. It matches the id returned by the sessions endpoints. |
realm_access.roles | The assigned role, alongside built-in platform roles such as offline_access, uma_authorization, and default-roles-{organization}. Check that the role you need is present; never assume the array has one entry. Machine tokens carry only the built-in roles. Management endpoints require admin here. |
preferred_username | Username. Mutable, so do not key on it. |
email | Email address. Mutable, so do not key on it. |
Validating tokens in your own API
When your service accepts Algebrix Identity tokens, it should:
- Verify the signature against the keys endpoint. Select the key by the token's
kidand accept onlyRS256signatures; the key set also contains an encryption key, which is not for signature checks. Cache the keys and refresh them when you see an unknownkid. - Verify that
issequals your organization's issuer value exactly. - Verify
exp. - If only certain applications may call your API, check
azpagainst their client IDs. Becauseaudis the same on every user and machine token, it cannot do this job. - If you accept agent tokens, apply the agent checks in section 08 as well, including the audience check.
Validate tokens locally in this way. Token introspection is not available in this version. The resource-server/node-express sample (section 06) implements these checks.
Token lifetimes
| Token | Lifetime |
|---|---|
| User access token | 300 seconds by default. Administrators can change it from 60 to 3,600 seconds in the console (section 14). |
| Machine-to-machine access token | 3,600 seconds. No refresh token is issued; request a new token when it expires. |
| Agent access token | The mandate's lifetime: at most 900 seconds on high tier, 1,800 on medium, and 3,600 on low. No refresh token is issued. |
| Refresh token | Valid for the organization's idle sign-out period, which is 1,800 seconds by default. Each refresh restarts that period, up to the maximum session length (36,000 seconds by default), after which the user must sign in again. |
Read expires_in from the token response rather than hardcoding a duration. An administrator can change the user token lifetime at any time.
Refresh tokens are not rotated. Each refresh returns a new refresh token value, and the previous one also stays valid until the session ends or is revoked. Store the latest one. Keep refresh tokens server-side, and never in browser-accessible storage.
Sign-out is shared across the organization. When a user signs out of any application in the organization, or the session reaches its idle or maximum limit, the next refresh in every application fails with invalid_grant and Session not active. Send the user back through sign-in.
Revocation
Know what each kind of revocation does before you rely on it:
- Revoking a refresh token through
POST /oauth2/revokestops it immediately. The next refresh fails with400 invalid_grant. - Revoking an access token does not stop the management API accepting it. The API validates tokens by signature and does not query the identity server on each request. A revoked access token stays usable until its
exp. - Revoking a session (section 10) signs the user out and stops their refresh token. An access token already issued from that session stays valid until it expires, which is at most the organization's access token lifetime.
- Suspending an agent instance (section 07) stops new tokens within seconds. Agent tokens already issued stay valid until they expire, unless the receiving API checks the suspended list (section 08).
Revoke the user's sessions and disable the user. The access token lifetime is your revocation window, so keep it short if this matters to you.
06 Quickstarts
Every path starts the same way: create an application of the right type in the console, register its addresses, and copy its client ID from the integration view. These examples use the path form of the identity endpoints. Section 05 explains when to use the issuer value instead.
Sample applications
Runnable starter apps are published at github.com/algebrix/algebrix-identity-samples. They use the standard open-source OIDC libraries listed in section 05. They are not an SDK: there is nothing Algebrix-specific to install, and the code applies exactly the configuration this document describes. Each sample runs locally, uses placeholders for your organization and client ID, and states the documentation version it was tested against.
| Application type | Stack | Folder |
|---|---|---|
| Single-page app | React | spa/react |
| Single-page app | Angular | spa/angular |
| Server-side web app | Node.js, Express | server-side-web/node-express |
| Machine-to-machine | Node.js | machine-to-machine/node |
| Protecting your own API | Node.js, Express | resource-server/node-express |
Download a single sample without cloning the whole repository:
npx degit algebrix/algebrix-identity-samples/<type>/<stack> my-app
# for example
npx degit algebrix/algebrix-identity-samples/spa/react my-app
Then follow the sample's README: create the matching application in the console, register the addresses it lists, and fill in your organization and client ID. Samples for further stacks and for native applications will be listed here as they become available.
Path A: sign a user in (single-page or native app)
Create the application
Create a single-page app or a native or mobile app, and register the redirect URI your application will use, plus the page users should land on after signing out. An unregistered redirect URI is refused before the user sees a sign-in screen. The identity server shows its own error page, and no error is returned to your callback.
Send the user to the authorization endpoint
Generate a PKCE code verifier and its S256 challenge, store the verifier, then redirect:
GET https://auth.algebrix.co/{organization}/oauth2/authorize
?client_id={client_id}
&redirect_uri=https://app.example.com/callback
&response_type=code
&scope=openid profile email
&code_challenge={challenge}
&code_challenge_method=S256
&state={random_value}
Without code_challenge_method, or with plain, the request is refused with invalid_request.
Exchange the code for tokens
The user signs in, completes multi-factor authentication if required, and returns to your redirect URI with a code. Check that state matches the value you sent, then exchange the code:
POST https://auth.algebrix.co/{organization}/oauth2/token
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&client_id={client_id}
&code={code}
&redirect_uri=https://app.example.com/callback
&code_verifier={verifier}
Read the response
{
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"refresh_token": "eyJhbGciOiJIUzUxMiIs...",
"id_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 300,
"refresh_expires_in": 1800
}
expires_in reflects the organization's configured lifetime; 300 is the default.
Sample: spa/react and spa/angular implement this path end to end, including sign-out.
Path B: sign a user in (server-side web app)
Create a server-side web app and register its redirect URI. The flow is Path A, with two differences:
- The token exchange happens on your server and authenticates with the client secret, using either HTTP Basic or
client_secretin the form body. - PKCE is optional. Using it is recommended.
curl -X POST https://auth.algebrix.co/{organization}/oauth2/token \
-u "{client_id}:{client_secret}" \
-d "grant_type=authorization_code" \
-d "code={code}" \
-d "redirect_uri=https://app.example.com/callback"
Sample: server-side-web/node-express.
Path C: authenticate a service to your own API
Create a machine-to-machine application and copy its client ID and secret from the console. No addresses need registering.
curl -X POST https://auth.algebrix.co/{organization}/oauth2/token \
-d "grant_type=client_credentials" \
-d "client_id={client_id}" \
-d "client_secret={client_secret}"
The response carries an access token with expires_in: 3600 and no refresh token. Your API validates the token as described in section 05, checking azp if it should accept only this application.
- Machine tokens are metered per calendar month against the account's allowance (section 13).
- They cannot call the management API.
- The secret must never reach a browser or a mobile binary.
Samples: machine-to-machine/node obtains and uses a machine token, and resource-server/node-express is an API that validates it.
Path D: call the management API
Sign in a user who holds admin through any application in your organization, using Path A or B. Then call the management API from server-side code with the resulting access token:
curl https://api.algebrix.co/api/admin/users?page=1&size=25 \
-H "Authorization: Bearer {access_token}"
How to read the response:
200returns one page of users in your organization, and only yours. No organization parameter is sent; the platform reads it from the token.403means the token is valid but the user does not holdadmin, or the token is a machine token.401means the token was rejected before authorization. Read theWWW-Authenticateheader for the reason.
Every administrative change is recorded under the administrator who made it, in an audit trail scoped to your organization. Because management API calls are always made as a signed-in user, each change is traceable to an individual.
07 AI agent identities
AI agents now read data, draft content, and take actions through APIs, often for many businesses at once. Each of those businesses asks the same questions before it lets an agent near its data. Who is this agent? What is it allowed to do here? Who approves its sensitive actions? Who is accountable for it, and who can switch it off? What is on record, and can the record be trusted?
Agent identities answers those questions. Every agent gets:
- a verifiable identity of its own;
- a written mandate that limits what its tokens can carry;
- a named owner and controls proportionate to its risk;
- human approval for the actions you choose;
- a tamper-evident record of every token it was issued or refused, and every decision a person made about it, exportable as a signed evidence pack anyone can verify.
This is a governance system, not only a way to hand agents credentials. It covers the whole lifecycle: register an agent, scope it, have the customer accept it, approve its sensitive actions, let it act for users where you allow it, review it periodically, stop it, and retire it. Every step is recorded.
It was designed for companies that sell an AI agent as a service to other businesses, some of them regulated. The same model fits an internal team governing its own agents, and a company whose APIs or tool servers are called by other vendors' agents. All three are described under "Deployment patterns" below.
Examples in sections 07 and 08 follow one invented story. Novamark is an AI marketing agent vendor. Its customers are Meridian Savings Bank, which runs Novamark on high tier, and Harbor Analytics, which runs it on low tier. Novamark's API is https://api.novamark.test/marketing.
Classes, instances, mandates, credentials, approvers, and delegation are all managed by account administrators in the console. There is no public API for creating or managing agents in this version; it is on the roadmap. The endpoints in section 08 are the ones an agent and the APIs it calls use at runtime.
Why agents need their own identity
Agents are usually wired up with whatever credential is to hand. Each shortcut below creates a problem that an agent identity removes.
| Common shortcut | The problem | With an agent identity |
|---|---|---|
| One API key shared across every customer | One leak exposes every customer, and nobody can switch off one customer's deployment without the others | One instance and one credential per customer organization, never shared |
| The agent borrows a person's account | The agent gets everything that person can do, and its actions are indistinguishable from theirs | A separate identity with its own narrow mandate. Where it must act for a person, a delegated token names both, and carries only what both may do. |
| A long-lived secret in an environment variable or prompt | Anything that can read the secret, including a prompt-injected agent asked to print its environment, can impersonate the agent indefinitely | A private key that never leaves your runtime, tokens that expire in 15 to 60 minutes, and key rotation with an overlap window |
| Sensitive actions run unattended | An agent can publish, spend, or change records with nobody's agreement | Approval-required scopes, issued only after a named person approves the specific request |
| Permissions granted once and never revisited | The agent keeps access it no longer needs | A versioned mandate, and an owner review every 90 days on medium and high tier |
| Nobody owns the agent | When something goes wrong, there is no accountable person and no way to stop it quickly | A required named owner, and a kill switch at instance, class, or account level |
| No record beyond application logs | Nothing a customer's risk team or an auditor can rely on | Tamper-evident records and signed evidence packs that can be verified without access to Algebrix |
Agent identities uses open standards throughout:
- Authentication: the OAuth 2.0 client credentials grant, with a signed JWT assertion (RFC 7523).
- Human approval: OpenID Connect Client-Initiated Backchannel Authentication (CIBA).
- Acting for a user: OAuth 2.0 Token Exchange (RFC 8693).
- Evidence: RFC 8785 canonical JSON, SHA-256, and ES256 signatures.
There is no proprietary protocol and no SDK.
Identity, governance, and audit
A verifiable identity per agent, per customer. Signed-assertion credentials with key rotation, short-lived tokens, and claims that tell an API exactly which agent is calling.
Inventory, owners, risk tiers, narrow-only mandates, customer acceptance, human approval, acting for users, periodic review, and a three-level kill switch.
Tamper-evident records of every token and decision, versioned mandates with diffs, signed evidence packs, and a read-only view for the customer.
Where enforcement happens
Algebrix is the authorization server. It decides what an agent's tokens may carry, and refuses a token request outside the mandate. The API that receives the token is the enforcement point: it decides whether each individual call is allowed.
Issues tokens only inside the agent's mandate and approvals, and refuses and records every request outside them.
Validates the token on every call, and applies its own rules for amounts, targets, and data.
Algebrix enforces what an agent's tokens can carry. Your API, or your customer's, enforces what each call may do.
Token events show what the agent was allowed to attempt, not what it did. Proof of what actually happened lives in the systems that served the calls. Join them to Algebrix using the agent claims and the token's jti (section 08).
Algebrix does not see the downstream API call, the prompt, or the model's reasoning. It does not inspect tool calls, detect prompt injection, or judge the agent's behaviour. It makes sure an agent can only obtain what it was explicitly allowed, and records what it was allowed and what it asked for.
Approval reasons are written by the agent. Approvers see them labelled that way, and should judge the request, not take the reason on trust.
Suspension stops new tokens immediately. Tokens already issued stay valid until they expire, at most 15, 30, or 60 minutes depending on the risk tier. APIs that check the suspended list (section 08) can close that window to about two minutes.
Credentials the agent holds for other systems, such as a customer's CRM token, are outside Algebrix's scope.
Terminology
These terms are used throughout the console and this document.
| Term | Meaning |
|---|---|
| Agent class | Your agent product as registered, for example "Novamark marketing lead". It holds a passport, a risk tier, a class policy, and a named owner. It lives at account level, so one class can be deployed into many organizations. |
| Passport | The descriptive facts about a class that customers and auditors ask for: name, purpose, provider, model, version, tools used, data classes touched, and a documentation link. |
| Class policy | The most any instance of the class may ever hold: scopes, audiences, and a lifetime cap. A mandate can only be narrower. |
| Agent instance | One deployment of a class in one organization, usually one customer. It has its own credential, mandate, lifecycle state, and activity. Credentials are never shared across customers. |
| Scope | A named permission a token can carry, such as crm.read. Scopes are written resource.action[.qualifier]. |
| Scope catalogue | An organization's list of the scopes an agent may be granted there. You define it; a new organization's catalogue starts empty. |
| Access type, sensitive flag | Each catalogue scope is marked read or write, and sensitive or not. Together they decide which scopes require approval by default. |
| Audience | An API a token is valid for, such as https://api.novamark.test/marketing. It is carried in the token's aud claim. |
| Mandate | An instance's effective permissions: granted scopes, approval-required scopes, allowed audiences, token lifetime, and delegation settings. It always sits inside the class policy and the organization's catalogue. It is versioned, and summarised in plain language. |
| Approval-required scope | A granted scope that is never issued by an ordinary token request. It is issued only through an approval request that a named person approves, one token per approval. |
| Approval request | An agent's request for one approval-required scope, with a reason. It is bound to the instance, scope, audience, and reason, and lapses if not decided within 10 minutes. |
| Approver | A person who may decide approval requests for an agent: vendor administrators, customer administrators, or, if nobody is named, the agent's owner. |
| Standing approval | On medium tier only, an approver can approve matching requests for up to 24 hours. Either side can revoke it. |
| Delegation | Letting an agent act for a signed-in user of the customer's own application. The agent exchanges the user's token for a delegated token. |
| Delegated token | A token that names the user as sub and the agent as azp, and carries only the scopes both the user's token and the mandate allow. |
| Risk tier | Low, medium, or high, computed from three questions when the class is created. It sets the token lifetime cap, credential options, approval defaults, review, and whether customer acceptance is required. |
| Owner | The account administrator accountable for a class or an instance. An owner is required and can never be empty. |
| Customer acceptance | On high tier, an administrator of the customer organization must accept the mandate before the agent receives any token. |
| Attestation | The owner's confirmation, every 90 days on medium and high tier, that the agent is still needed. Without it, the agent expires. |
| Lifecycle state | Where an instance is in its life: provisioning, pending acceptance, active, suspended, expired, retired, or failed. |
| Kill switch | Suspension at instance, class, or account level. New tokens stop within seconds. |
| Key rotation | Adding a new public key with an overlap window, during which both keys are accepted. A key can also be marked compromised, which removes it at once. |
| Refused token request | A token request outside the mandate, refused at issuance and recorded against the instance. This is the enforcement Algebrix can see and prove. |
| Activity | The per-instance timeline of token events and governance events, each labelled with its source. |
| Tamper-evident record | Every agent event is chained to the one before it by a hash, and the chain is periodically signed, so changing or removing any event is detectable. |
| Evidence pack | A signed export of one agent's, or a whole organization's, records over a date range: JSON for verification and a PDF summary. |
| Agents in this organization | The customer administrators' read-only view of every agent in their organization |
| Signed assertion | A short-lived JWT the agent signs with its private key to prove its identity at the token endpoint (private_key_jwt). The private key itself is never sent. |
| Agent claims | Three claims on every agent token, algebrix_agent_instance, algebrix_agent_class, and algebrix_agent_tier, which let an API identify and log the agent without a lookup. |
Who does what
| Party | Role |
|---|---|
| Account administrators (the vendor) | Manage everything about agents in the console, under AI agent security > Agent identities: the scope catalogue, classes, instances, mandates, credentials and rotation, approvers, delegation, suspension, retirement, and evidence packs. |
| Owner | The account administrator accountable for a class or instance. They answer the 90-day review, receive approval outcomes, and decide customers' suspension requests below high tier. |
| Organization administrators (the customer) | Users holding admin in the customer organization. They do not see the agent management screens. They can:
|
| The agent runtime | Your code. It holds the instance's private key, requests tokens, registers approval requests, exchanges user tokens where delegation is on, and calls APIs. It never uses the console. |
| APIs that accept agent tokens | Yours, or your customer's. They validate every token and enforce each call (section 08). |
| Auditors and risk teams | Receive evidence packs and verify them independently, with the published key set (section 08). |
Machine-to-machine applications and organization tokens cannot manage agents.
Risk tiers
When you create a class, the console asks three questions:
- Does the agent write, or only read?
- Does it move money, publish externally, or touch regulated data?
- Does it act for users?
Two or more yes answers give high, one gives medium, and none gives low. A tier can be raised but never lowered. Raising an instance's tier is refused if its current mandate does not fit the new tier's limits, so narrow the mandate first.
| Low | Medium | High | |
|---|---|---|---|
| Maximum token lifetime | 60 minutes | 30 minutes | 15 minutes |
| Credential | Signed assertion, or a secret (with a warning) | Signed assertion only | Signed assertion only |
| Approval-required by default | None | Scopes that are both sensitive and write | Every write scope |
| Releasing a default approval scope | Allowed | Allowed | Needs a written justification, stored with the mandate and shown in its summary |
| Approval decision window | 10 minutes | 10 minutes | 10 minutes |
| Standing approval | Not available | Up to 24 hours | Not available |
| Customer acceptance | Not required; the customer's administrators are notified | Not required; notified | Required before any token, and again after a mandate or delegation change, a resume, or an expiry |
| Owner review (attestation) | None | Every 90 days | Every 90 days |
| Key rotation | When you choose | When you choose | A 90-day rotation date is shown |
| Customer's suspension request | The owner decides | The owner decides | Suspends at once |
| Refusal alert in the console | Off | On, for repeated refusals | On, for repeated refusals |
Scope catalogue
- You define it, per organization. A new organization's catalogue starts empty, and nothing is created by default. In the vendor pattern, define the same scope names in each customer organization.
- Names follow
resource.action[.qualifier], lowercase and dot-separated:crm.read,campaigns.draft,campaigns.publish,adspend.commit.large. Invalid names are refused. - Each scope has an access type, read or write, and a sensitive flag.
- Business limits are qualifiers. Algebrix issues or withholds
adspend.commit.large; your API decides what "large" means. - A scope named by a class policy or by any mandate cannot be deleted, even after it is retired, because it is part of the record.
Mandates
| Field | Meaning |
|---|---|
| Granted scopes | The scopes the agent's tokens may carry on an ordinary token request |
| Approval-required scopes | Scopes issued only through an approved approval request (Starter and above) |
| Allowed audiences | The APIs the token is valid for. These alone decide the token's aud. |
| Token lifetime | At most the lower of the class cap and the tier cap |
| Delegation | Off, or on for a chosen set of users and applications (Growth and above) |
- Narrow only. Every scope, audience, and lifetime must sit inside the class policy and the organization's catalogue. A wider mandate is refused, and the refusal names the offending item.
- A plain-language summary is generated for every mandate, and shown to you, to the customer, and in the version history. For example: "This agent can obtain tokens carrying the scopes 'crm.read' and 'campaigns.draft' for the API 'https://api.novamark.test/marketing', each valid for at most 15 minutes. The scope 'campaigns.publish' needs human approval…". The mandate tab also lists what the agent cannot do.
- Every edit writes a new version, recording the administrator, the reason, and a diff. Below high tier, an edit applies within seconds and the customer's administrators are notified. On high tier, it waits for the customer's acceptance, and the live mandate is unchanged until then.
- Class policy changes. A narrowing applies to every affected instance immediately, without acceptance, with progress shown. A widening grants nothing to existing instances; it only raises the ceiling.
Human approval
Mark a scope as approval-required when the action behind it should never happen unattended: publishing, spending, or changing regulated records. Human approval is available on Starter and above.
- An ordinary token request never carries an approval-required scope. It is refused with
invalid_scope. The agent must register an approval request, and receives the scope only after a person approves it (section 08). - Who approves is set on the Approvals screen:
- vendor administrators you name;
- customer administrators you name, who are emailed and can step out;
- customer administrators who opt in themselves, on their approvals page or the high tier acceptance page.
- Where they decide: in the console's approvals inbox, which is designed for phones and flagged in the header when something is waiting, or from the link in the approval email.
- What the approver sees: the agent, the scope, the audience, and the agent's reason, clearly labelled as written by the agent.
- One approval releases one token, bound to the exact instance, scope, audience, and reason. Identical open requests collapse into one.
- A request not decided within 10 minutes lapses, and releases nothing.
- Standing approval, medium tier only: an approver can approve matching requests for up to 24 hours. The vendor or the customer administrator can revoke it at any time.
- The owner is emailed when a request is approved, denied (with the decider and their note), or lapses. Uses of a standing approval are recorded but not emailed one by one.
- The token does not carry an approval ID. Algebrix links each approval to the token it released by the token's
jti, in the Activity and in evidence packs. Logjtiin your API to join the two.
Acting for a user
Some actions must be attributable to a person: "Lee Park at Meridian asked the agent to draft this". Delegation lets the agent exchange a token that a user obtained from one of the customer's own applications for a token that acts for that user. It is available on Growth and above.
- The delegated token carries only what both sides allow: the intersection of the user's token and the agent's mandate, never more than either.
- Who the agent may act for is chosen per instance on the Access tab: named users, everyone with a role, or all users. You also choose which of the customer's applications' sign-ins may be used. Users and applications outside that choice are refused.
- The customer's application must request the delegated scopes when the user signs in. Turning delegation on adds them to the chosen applications as optional scopes, so they appear only when requested.
- Turning delegation off, narrowing it, or retiring the agent never removes those scopes from the application, so the customer's sign-ins keep working. Left-over scopes can be removed explicitly on the Access tab.
- On high tier, delegation changes wait for the customer's acceptance. On medium and low tier, the customer's administrators are notified.
- Every refused exchange is recorded, like any refused token request.
Lifecycle
| State | Meaning |
|---|---|
provisioning | The instance is being set up |
pending acceptance | High tier only. It waits for the customer organization's administrator, and token requests return invalid_client. |
active | Tokens are issued inside the mandate |
suspended | Stopped by the kill switch, or at the customer's request. New tokens are refused. |
expired | The owner missed the 90-day review. Tokens stop, and the owner and the customer's administrators are told. One confirmation reopens it; high tier goes back through customer acceptance. |
retired | The credential is destroyed. The instance, its mandate history, and its records are kept. Retired classes and instances do not count toward plan limits. |
failed | Setup did not complete. The console offers Retry. |
Every transition is recorded, with the person and the reason.
Customer acceptance
A high tier agent receives no token until the customer agrees to its mandate. The vendor cannot accept on the customer's behalf.
Every administrator of the customer organization receives an email, with a link to an acceptance page in their organization's console.
The page shows the vendor, the agent, its purpose, the scopes it may carry, approval-required scopes, audiences, delegation, the token lifetime, and the statement of what Algebrix enforces. The administrator can also opt in as an approver here.
The administrator either accepts, and the agent becomes active, or requests changes with a note, which is emailed to the owner.
You answer with a new mandate version, or with a reply note that resends the same mandate. The customer is asked again. The whole exchange is kept on the instance's Access tab and in its records.
Acceptance is needed again after a mandate or delegation change, and after a high tier instance is resumed or reopened from expiry.
The customer's view
Customer administrators have a read-only page, Agents in this organization, listing every agent in their own organization, with live agents first and retired ones folded. For each agent it shows:
- the passport;
- the plain-language mandate and its history;
- recent activity;
- approvals.
From the page, customer administrators can:
- request evidence packs, when the vendor's plan includes them;
- revoke a standing approval;
- request suspension. On high tier the agent is suspended at once. On medium and low tier, the vendor's owner is notified and decides.
No credential material is ever shown: no key, certificate, secret, or key ID. An agent in another organization cannot be seen; it answers as not found.
Kill switch
| Level | Stops | Confirmation |
|---|---|---|
| Instance | One customer's deployment | A reason and typed confirmation |
| Class | Every instance of the class, across every organization. Use this for a faulty prompt or a model regression. | A reason and typed confirmation |
| Account | Every agent in the account | A reason and the typed phrase suspend all |
- New tokens stop within seconds. Tokens already issued expire within the tier lifetime, and APIs that check the suspended list refuse them within about two minutes.
- Customers can request suspension from their own view.
- Resuming a high tier instance returns it to pending acceptance.
- There is no account-wide resume; resume by class or by instance.
- An instance cannot be resumed on its own while its class is suspended.
Key rotation and periodic review
- Rotation. On the instance's Credential tab, add a new public key with an overlap window, from 0 to 168 hours (24 by default). Both keys are accepted during the overlap, then only the new one. Agents must name their key in every assertion (
kid), so the right key is used during an overlap. High tier shows a 90-day rotation date. - Mark compromised. Removes one key at once; it is refused within about five seconds. The last remaining key cannot be removed: rotate first, or suspend the agent.
- Attestation. On medium and high tier, the owner confirms every 90 days that the agent is still needed. The first review falls 90 days after acceptance, or after creation where there was no acceptance, and each confirmation restarts the 90 days.
- The owner is asked 14 days ahead and reminded 3 days ahead.
- With no answer by the due date, the agent expires: its tokens stop, and the owner and the customer's administrators are told.
- One confirmation reopens it. High tier goes back through customer acceptance.
Governance and audit trail
Everything above is recorded, so you can show a customer's risk team, or your own auditor, what each agent was permitted, what it asked for, who approved what, and what people decided about it.
| Record | What it holds |
|---|---|
| Inventory | The Classes and Instances tabs list every agent across every organization, with owner, tier, state, last token, and refusals in the past 7 days. You can filter by organization, class, state, tier, and refusal alert. |
| Mandate history | Every version, with the person, the reason, and a diff. Any two versions can be compared. |
| Acceptance record | Who accepted or requested changes, when, and with what note |
| Approvals | Every request with the agent's reason, the decision, the decider and their note, the time, and the token it released, plus standing approvals and their uses |
| Activity timeline | Token events (issued, refused, exchanged) and governance events (approvals, mandate, delegation, lifecycle, credential, and review changes). Each event is labelled with its source: Identity for token events, or Governance for decisions people made. You can filter by type, source, outcome, and date range. |
| Refused token requests | Grouped by scope and reason, for example "not in the mandate" or "suspended". Refusals appear within seconds. |
| Tamper-evident records | Every event is hash-chained to the one before it, per agent, and the chain is signed at regular checkpoints. Any change to a recorded event is detectable. |
| Evidence packs | A signed JSON and PDF export of one agent or a whole organization over a date range, verifiable offline (Growth and above) |
| CSV export | Up to 100,000 events from the Activity tab, with a coverage line stating how current the record is |
| Audit log | Every create, mandate change, suspend, resume, and retire also writes an audit entry naming the administrator who acted |
| Governance card | On the console Overview: agents waiting for acceptance, with a refusal alert active, suspended, without an owner, with credentials older than 90 days, or idle for 30 days. Each count opens the filtered list. |
Agent records are kept for the plan's retention period: 7, 30, or 90 days, or 12 months on Scale (section 13). When records age out, the removal itself is recorded, and the chain still verifies from that point.
Evidence packs
An evidence pack is a signed export for one agent, or for a whole organization, over a date range. It has two files:
- JSON, which holds the evidence and is what you verify;
- PDF, a human-readable summary that names the SHA-256 of the JSON, so the two can be matched.
A pack contains:
- the passport;
- the mandate history, with the person and the reason for each version;
- approvals, standing approvals, and their decisions;
- delegation settings;
- lifecycle and credential events;
- daily token summaries, and the full event list;
- the chain head and signed checkpoints;
- a coverage statement, and the disclosures, including that token events show what the agent was allowed to attempt, not what it did.
How packs work:
- Packs are requested in the console from an instance's Activity tab, or by a customer administrator from their view. They are available on Growth and above.
- The range defaults to the last 30 days, and can be up to 366 days.
- A pack is usually ready within about 90 seconds. An email with a link to the console announces it.
- There is no anonymous download link. Packs can be downloaded for 30 days.
- A pack covers only what the plan's retention still holds.
- Packs name the people who acted, by email address. Handle them as you would any record containing personal data.
Anyone holding a pack can verify it without access to Algebrix; section 08 has the method and a reference verifier.
Answering a customer's security questionnaire
Third-party risk reviews ask a predictable set of questions about agents. This is where each answer comes from.
| Question | Answer |
|---|---|
| How does the agent authenticate? | With a private key held only by the vendor, proving possession through a signed assertion. One credential per customer, rotatable with an overlap window. |
| What can it access in our tenant? | Only what its mandate grants, shown in a plain-language summary and on your own agents page. On high tier, nothing until you accept. |
| Who approves sensitive actions? | Approval-required scopes are issued only after a named person, yours or the vendor's, approves the specific request. Each approval releases one token. |
| Can it act as our users? | Only where delegation is on, for the users and applications chosen, and never with more than the user's own token allows |
| Who is accountable, and who can stop it? | A named owner. The kill switch stops new tokens within seconds, and you can request suspension yourself. |
| How long do credentials live? | Tokens last 15, 30, or 60 minutes by risk tier, with no refresh tokens |
| Is the agent reviewed? | On medium and high tier, the owner confirms every 90 days, or the agent expires |
| Can we have the records, and trust them? | Yes. Signed evidence packs, which you can request yourself and verify independently with the published key set. |
These records support your answers. They do not by themselves make you or your customer compliant with any framework.
Deployment patterns
| Pattern | How it maps |
|---|---|
| Vendor serving many customers | You hold one Algebrix account. Each customer is an organization in it, and your agent product is one class. Each customer gets its own instance, credential, and mandate: Meridian's instance can be narrower than Harbor's. The customer's administrator is invited to their organization with the admin role, so they can accept mandates, approve requests, and see their agents. Each customer organization counts toward the plan's organization allowance (section 13). |
| Internal team governing its own agents | Your own organization plays the customer. Classes describe your internal agents, and instances run in your organization. Approvers and acceptance by an administrator of that organization give you a second pair of eyes on every mandate and sensitive action. |
| Your APIs or tool servers called by other vendors' agents | You register each third-party agent as a class and an instance in your organization, and the vendor gives you a JWKS URL for its public key. You never hold their private key. Your API validates their tokens (section 08), and you can stop any of them with the kill switch. |
Recommended agent designs by industry
These are typical designs. Your tier is always computed from your own answers to the three questions. The pattern that holds across industries is the same: split reads from writes, express limits as qualifiers, and require approval for every scope that commits money, publishes, or changes regulated records.
| Industry | Example agent | Example scopes | Typical tier, and why |
|---|---|---|---|
| Marketing | AI marketing lead | crm.read, campaigns.draft, campaigns.publish, adspend.commit.small, adspend.commit.large | High. It writes, publishes externally, and spends money. Require approval for campaigns.publish and adspend.commit.large. |
| Financial services | Transaction insights assistant | transactions.read, reports.read | Medium. Read only, but it touches regulated financial data. |
| Financial services | Reconciliation agent | payments.read, ledger.draft, ledger.post | High. It writes to regulated records. Require approval for ledger.post, and keep drafting separate. |
| Healthcare | Clinical summary assistant | encounters.read | Medium. Read only, on regulated health data. Use delegation so each summary is requested for a named clinician. |
| Healthcare | Scheduling agent | appointments.read, appointments.write | High. It writes, and touches regulated data. |
| Insurance | Claims intake triage | claims.read, claims.route | High. It writes routing decisions on regulated claims data. |
| Customer support | Support triage and drafting | tickets.read, replies.draft, replies.send | High with replies.send, which publishes to customers; require approval for it, or use a standing approval on medium tier. Medium without it. |
| Retail and e-commerce | Catalogue enrichment | catalog.read, catalog.draft, catalog.publish | High. It writes and publishes externally. Require approval for catalog.publish. |
| Legal and professional services | Contract review assistant | contracts.read, annotations.write | Medium. It writes annotations only. If your contracts count as regulated data, it becomes high. |
| Software and IT operations | Incident triage | logs.read, incidents.read | Low. Read only, on operational data, acting for nobody. |
Design guidance
- One class per product with a distinct risk profile. A read-only assistant and an agent that publishes should be separate classes, not one broad class.
- Separate scopes for read, draft, and commit, and require approval for the commit step. The low-risk path stays fast while the risky step waits for a person.
- Use delegation when an action must be attributable to a user, and approval when it must be agreed by a person. They answer different questions, and can be combined.
- One audience per API. A token for your marketing API is then useless at your payments API.
- Start narrow. Widening a mandate is a recorded, versioned edit, and on high tier the customer accepts it.
- Use a key, not a secret, and plan rotation from the start.
Step by step: from first class to first token
This walkthrough follows the vendor pattern, with Novamark and Meridian. For an internal team, use your own organization in steps 1 and 5.
Prepare the customer organization
As an account administrator, create an organization for the customer (section 03). Invite the customer's administrator with the admin role (section 10). They accept high tier mandates, can approve requests, and see the customer's view.
Define the scope catalogue
Open AI agent security > Agent identities > Scope catalogue, select the organization, and add each scope with its access type and sensitive flag. Use the same names in every customer organization.
Register the agent class
On the Classes tab, create a class:
- Fill in the passport.
- Answer the three tier questions, and review the controls the computed tier implies.
- Set the class policy: the most any instance may hold in scopes, audiences, and token lifetime.
- Name the owner.
Prepare a credential
Generate a key pair for this customer's instance, and publish the public key at a JWKS URL, or keep it ready to upload (section 08). On low tier you can use a secret instead, generated by Algebrix.
Create the instance
On the Instances tab, create an instance:
- Choose the organization and the class.
- Set the mandate: scopes, audiences, and lifetime. Approval-required scopes are pre-selected by tier; release any with a justification where needed.
- Register the credential, and note the key ID shown on the Credential tab.
- Review the plain-language summary before you confirm.
Name approvers (Starter and above)
If the mandate has approval-required scopes, open Approvals and name who decides: your administrators, the customer's administrators, or both. If you name nobody, the owner decides.
Set up delegation, if the agent acts for users (Growth and above)
On the instance's Access tab, turn delegation on. Choose which users the agent may act for, and which of the customer's applications' sign-ins may be used. Ask the customer to have those applications request the delegated scopes at sign-in.
Get the customer's acceptance (high tier)
The instance enters pending acceptance, and the customer's administrators are emailed. Respond to any requested changes with a new mandate version or a reply. Low and medium tier instances become active straight away, and the customer's administrators are notified.
Integrate the runtime
Open the instance's Integration tab. Copy the token URL, client ID, key ID, and the snippet for your runtime. Then:
- request a token and call your API with it;
- add the approval flow if you use approval-required scopes;
- add the token exchange if you use delegation.
Section 08 covers each.
Protect the API
Make every API that accepts agent tokens apply the checks in section 08: signature, issuer, audience, expiry, agent identity, and scopes. For high tier, also check the suspended list.
Prove the boundaries
Run each of these checks:
- Request a scope outside the mandate: you receive
invalid_scope, and the refusal appears in Activity within seconds. - Request an approval-required scope, deny it once, and approve it once.
- Suspend the instance: token requests return
invalid_client. Then resume it.
Operate
Day to day:
- Watch the governance card and each instance's Activity.
- Answer reviews before the due date, and rotate keys on schedule.
- Produce evidence packs when customers or auditors ask.
- Change mandates through versioned edits, and use the kill switch when something looks wrong.
- Retire instances when a customer leaves.
Coming soon
These capabilities are on the roadmap and are not available in this version.
| Capability | Status |
|---|---|
| A public management API for agents, to create and manage classes and instances programmatically | Roadmap. Agents are managed in the console. |
| Emergency access: a time-boxed exception, approved by a second administrator | Available once accounts can have more than one administrator |
| Agent-to-agent chaining | Roadmap |
| Refusal reporting from customer APIs back into the agent's record | Roadmap |
| MCP authorization support | Roadmap |
| Scheduled evidence packs | Roadmap |
08 Agent integration
Agents use standard OAuth 2.0 and OpenID Connect throughout:
- Tokens: the client credentials grant, using a signed assertion or, on low tier, a secret.
- Approval-required scopes: OpenID Connect CIBA.
- Acting for a user: OAuth 2.0 Token Exchange.
There is no SDK; any HTTP client and any JOSE library will do.
Each instance's Integration tab in the console shows the exact token URL, client ID, and key ID, with copy-ready snippets. Copy those values from there, and treat the client ID as opaque: do not build it from the class or organization name.
Runtime shapes
| Shape | What it does | Plans |
|---|---|---|
| Backend worker | The agent requests its own token and calls APIs with it. This is the common case. | All |
| Approved action | The agent asks for an approval-required scope, a person approves, and the agent receives one token carrying it | Starter and above |
| Acting for a user | The agent exchanges a signed-in user's token for a delegated token naming both | Growth and above |
| MCP server or tool host | Accepts agent tokens and validates them as a resource server, using the contract below | All |
Choosing a credential
| Credential | Tiers | How it works |
|---|---|---|
| JWKS URL (recommended) | All | You publish your public keys at an HTTPS URL, and can change keys without a console visit. The URL must be publicly reachable over HTTPS and serve the key set directly, without redirects. Keep it small and quick to respond. |
| Public key or certificate upload | All | You upload a PEM public key or certificate in the Credential step, and rotate it from the Credential tab |
| Secret | Low only | Generated by Algebrix and shown once. It is never shown again or stored readably, and can be regenerated. A secret is a bearer value: anything that reads it, including a prompt-injected agent, can impersonate the agent. Move to a key before production. |
Accepted signing algorithms are RS256, PS256, and ES256. The minimum key size is RSA 2048 or P-256. Sign with the algorithm of the key you registered.
Creating a key pair
# RSA 2048, for RS256 or PS256
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out agent-private.pem
openssl pkey -in agent-private.pem -pubout -out agent-public.pem
# or P-256, for ES256
openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out agent-private.pem
openssl pkey -in agent-private.pem -pubout -out agent-public.pem
Create one key pair per instance, so per customer. Upload agent-public.pem, or publish it as a JWK with a kid at your JWKS URL. Move the private key straight into your secrets manager.
The private key lives in a secrets manager or KMS. It must never be in a repository, a prompt, a log, or the agent's memory or context. Load it into the process that signs assertions, and nowhere else.
Requesting a token
Before each token request, the agent signs a short-lived JWT with its private key:
| Assertion part | Value |
|---|---|
Header alg | The algorithm of your registered key |
Header kid | Required. The key ID shown on the Credential tab, or the kid in your JWKS. During a rotation overlap, it tells the token endpoint which key to use. |
iss, sub | The client ID |
aud | The token endpoint URL, exactly as shown on the Integration tab |
iat | Now |
exp | At most 5 minutes ahead. 60 seconds is a good value. |
jti | A unique value for every request. A reused assertion is refused. |
POST {token_url}
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&client_id={client_id}
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion={signed_jwt}
&scope=crm.read campaigns.draft
{token_url} is your organization's token endpoint (section 09), as shown on the Integration tab.
HTTP/1.1 200 OK
Content-Type: application/json
{
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"expires_in": 900,
"token_type": "Bearer"
}
Node.js (jose)
import { SignJWT, importPKCS8 } from 'jose';
import { randomUUID } from 'node:crypto';
const clientId = process.env.AGENT_CLIENT_ID; // from the Integration tab
const tokenUrl = process.env.AGENT_TOKEN_URL; // from the Integration tab
const keyId = process.env.AGENT_KEY_ID; // from the Credential tab
const alg = 'RS256'; // ES256 for a P-256 key
const key = await importPKCS8(process.env.AGENT_PRIVATE_KEY, alg); // from your secrets manager
export async function signAssertion(issuer = clientId, audience = tokenUrl) {
const now = Math.floor(Date.now() / 1000);
return new SignJWT({})
.setProtectedHeader({ alg, kid: keyId })
.setIssuer(issuer).setSubject(issuer).setAudience(audience)
.setIssuedAt(now).setExpirationTime(now + 60).setJti(randomUUID())
.sign(key);
}
export async function getAgentToken(scope) {
const res = await fetch(tokenUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: clientId,
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
client_assertion: await signAssertion(),
scope,
}),
});
if (!res.ok) throw new Error(`token request failed: ${res.status} ${await res.text()}`);
return res.json(); // { access_token, expires_in, token_type }
}
Python (PyJWT and requests)
import os, time, uuid
import jwt, requests # pip install pyjwt[crypto] requests
client_id = os.environ["AGENT_CLIENT_ID"]
token_url = os.environ["AGENT_TOKEN_URL"]
key_id = os.environ["AGENT_KEY_ID"]
private_key = os.environ["AGENT_PRIVATE_KEY"] # loaded from your secrets manager
def sign_assertion(issuer=client_id, audience=token_url, alg="RS256"):
now = int(time.time())
return jwt.encode(
{"iss": issuer, "sub": issuer, "aud": audience,
"iat": now, "exp": now + 60, "jti": str(uuid.uuid4())},
private_key, algorithm=alg, headers={"kid": key_id})
def get_agent_token(scope):
r = requests.post(token_url, data={
"grant_type": "client_credentials",
"client_id": client_id,
"client_assertion_type": "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
"client_assertion": sign_assertion(),
"scope": scope,
}, timeout=10)
r.raise_for_status()
return r.json()
With a secret (low tier)
curl -X POST {token_url} \
-d "grant_type=client_credentials" \
-d "client_id={client_id}" \
-d "client_secret={client_secret}" \
-d "scope=crm.read"
Request rules
scopeis space-separated, and every scope must be one of the instance's granted scopes. Request only what the current task needs.- Approval-required scopes are never issued here. Requesting one returns
invalid_scope; use the approval flow below. - Do not send the
resourceparameter. It is not supported for agent tokens. The token's audiences come only from the mandate, and the Integration tab states which audiences the token will carry. - No refresh token is issued. When the token expires, sign a new assertion and request a new token. Reuse a token until shortly before
expires_in; every token counts toward your plan's machine-to-machine token allowance (section 13).
Requesting an approval-required scope
The approval flow is OpenID Connect Client-Initiated Backchannel Authentication (CIBA Core 1.0). The agent first registers its request and reason with Algebrix, because a CIBA binding_message is too short to carry a reason. The approver's side happens entirely in the Algebrix console and email.
Get the agent's own token
Request a token with the agent's ordinary scopes, as above.
Register the request and its reason
POST https://api.algebrix.co/api/agent/approval-requests
Authorization: Bearer {agent_access_token}
Content-Type: application/json
{ "scope": "campaigns.publish", "reason": "Publish the spring savings campaign to the bank's social channels" }
HTTP/1.1 201 Created
{
"approvalId": "882897ed-5554-49de-9027-a706f9f27a51",
"correlationId": "apr-x4py35vbyiprcz4t",
"expiresAt": "2026-11-24T13:27:09.739527Z",
"approvalClientId": "{approval_client_id}",
"loginHint": "{login_hint}",
"backchannelEndpoint": "{backchannel_endpoint}",
"tokenEndpoint": "{token_url}",
"collapsed": false
}
Use the values exactly as returned. The reason is shown to the approver labelled as written by the agent, and kept in the record, so keep secrets and personal data out of it.
Send the backchannel authentication request before expiresAt
Authenticate as approvalClientId, with the agent's same private key. In this assertion, iss and sub are approvalClientId, and aud is your organization's issuer, https://auth.algebrix.co/realms/{organization}.
POST {backchannel_endpoint}
Content-Type: application/x-www-form-urlencoded
client_id={approval_client_id}
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion={signed_jwt}
&scope=openid campaigns.publish
&login_hint={login_hint}
&binding_message={correlation_id}
HTTP/1.1 200 OK
{ "auth_req_id": "…", "expires_in": {seconds}, "interval": {seconds} }
The approvers are notified now. They have 10 minutes to decide; a request still undecided after that lapses, whatever expires_in says.
Poll the token endpoint
Poll no faster than interval seconds, authenticated as approvalClientId in the same way.
POST {token_url}
Content-Type: application/x-www-form-urlencoded
grant_type=urn:openid:params:grant-type:ciba
&auth_req_id={auth_req_id}
&client_id={approval_client_id}
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion={signed_jwt}
| Response | Meaning |
|---|---|
400 authorization_pending | No decision yet. Wait interval seconds and poll again. |
200 with an access token | Approved. The token carries the approved scope, the agent's ordinary scopes, the mandate's audience, and the agent claims. Its sub is the agent's service identity, and there is no refresh token. |
400 access_denied | Denied, or lapsed without a decision. Nothing was released. |
| Any other error | Final. A used auth_req_id is refused, so do not poll again; start a new request if the action is still needed. |
If you receive slow_down, increase your polling interval, as the CIBA specification describes.
Rules to build around:
- One approval releases one token. Use it for the approved action, then let it expire.
- The approval is bound to the instance, scope, audience, and reason you registered.
- An identical open request returns the existing one with
collapsed: true, until its backchannel request has been sent. After that, a repeat creates a new request. - Standing approvals (medium tier) need no change in your code: matching requests during the approved period are decided without waiting for a person.
- The token carries no approval ID. Log its
jti: Algebrix records which token each approval released byjti.
Acting for a user (token exchange)
The delegation flow is OAuth 2.0 Token Exchange (RFC 8693). Delegation must be on for the instance (section 07), and the user and application must be inside the instance's delegation settings.
The customer's application requests the delegated scopes
Any application in the customer's organization that is named on the instance's Access tab signs the user in as usual (authorization code, with PKCE for public clients). It must request the scopes it wants delegated, because they are optional on the application:
scope=openid crm.read campaigns.draft
The agent exchanges the user's access token
Authenticate with the agent's own key, exactly as for an ordinary token request:
POST {token_url}
Content-Type: application/x-www-form-urlencoded
grant_type=urn:ietf:params:oauth:grant-type:token-exchange
&client_id={client_id}
&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer
&client_assertion={signed_jwt}
&subject_token={user_access_token}
&subject_token_type=urn:ietf:params:oauth:token-type:access_token
&scope=crm.read campaigns.draft
scope is optional. requested_token_type=urn:ietf:params:oauth:token-type:access_token may be sent, and is the default.
Use the delegated token
The response carries an access token in which:
subis the user, andazpis the agent;- the three agent claims and the mandate's audience are present;
- the scopes are only those both the user's token and the mandate allow.
The exchange is refused with a standard OAuth error response in each of these cases. Each refusal is recorded in the instance's Activity.
- Delegation is off.
- The user, or the application their token came from, is outside the delegation settings.
- A requested scope is not in the user's token.
Agent token contents
| Claim | Agent token | Delegated token |
|---|---|---|
iss | The customer organization's issuer, https://auth.algebrix.co/realms/{organization} | |
aud | The mandate's allowed audiences. It may be a single string or an array, so handle both. | |
azp | The agent's client ID | |
sub | The agent's service identity | The user |
scope | The granted scopes requested, plus the approved scope on an approval token | Scopes allowed by both the user's token and the mandate |
exp, iat, jti | Standard claims. Log jti. | |
algebrix_agent_instance | The instance ID, as a string | |
algebrix_agent_class | The class ID, as a string | |
algebrix_agent_tier | low, medium, or high, as a string | |
{
"iss": "https://auth.algebrix.co/realms/meridian",
"aud": "https://api.novamark.test/marketing",
"azp": "{client_id}",
"sub": "5d0f2b7e-…",
"scope": "crm.read campaigns.draft",
"iat": 1795526400,
"exp": 1795527300,
"jti": "8c41e0a3-…",
"algebrix_agent_instance": "a3c0e5d2-…",
"algebrix_agent_class": "71b9c4f0-…",
"algebrix_agent_tier": "high"
}
- The three agent claims are separate string claims.
- Delegated tokens carry no
actclaim. Identify the acting agent byazpand the agent claims, and the user bysub. - Approval tokens carry no approval ID. The approval is linked to the token by
jti. - An agent token's
audnames the APIs it is for. User and machine-to-machine tokens always carryaccount(section 05). Your API can and must checkaud.
Protecting an API that accepts agent tokens
Every API, MCP server, or tool host that accepts agent tokens must apply these checks on every request:
| Check | Rule |
|---|---|
| 1. Signature and issuer | Verify against the organization's keys endpoint (https://auth.algebrix.co/{organization}/oauth2/keys). iss must be exactly that organization's issuer. |
| 2. Audience | aud must contain this API's identifier. Refuse otherwise, even if the scopes look right. |
| 3. Expiry | Honour exp, with at most 30 seconds of clock skew. There are no refresh tokens, so an expired token means the agent must request a new one. |
| 4. Agent identity | On endpoints meant only for agents, require algebrix_agent_instance. On a delegated token, sub is the user: authorize the call for that user, as well as the agent. |
| 5. Scopes | Check that the scope you need is present, rather than comparing the whole string. Amounts, counts, and targets are your API's own rules, expressed through scope qualifiers. |
| 6. Suspension (recommended on high tier) | Refuse tokens whose algebrix_agent_instance is on the organization's suspended list (below) |
| Logging | Log algebrix_agent_instance, sub, and jti on every request, so your records join the agent's records in Algebrix |
Node.js (Express and jose)
import { createRemoteJWKSet, jwtVerify } from 'jose';
const ORG = 'meridian';
const ISSUER = `https://auth.algebrix.co/realms/${ORG}`;
const JWKS = createRemoteJWKSet(new URL(`https://auth.algebrix.co/${ORG}/oauth2/keys`));
const API_ID = 'https://api.novamark.test/marketing';
// Refreshed every 60 seconds by refreshSuspended(), below.
let suspended = new Set();
export function requireAgentScope(required) {
return async (req, res, next) => {
const [kind, token] = (req.headers.authorization || '').split(' ');
if (kind !== 'Bearer' || !token) return res.status(401).end();
let payload;
try {
({ payload } = await jwtVerify(token, JWKS, {
issuer: ISSUER, audience: API_ID, algorithms: ['RS256'], clockTolerance: 30,
}));
} catch {
return res.status(401).end();
}
const instance = payload.algebrix_agent_instance;
if (!instance || suspended.has(instance)) return res.status(403).end();
const scopes = String(payload.scope || '').split(' ');
if (!scopes.includes(required)) return res.status(403).end();
console.log(JSON.stringify({
agent_instance: instance, sub: payload.sub, jti: payload.jti, method: req.method, path: req.path,
}));
req.agent = payload;
next();
};
}
// app.post('/campaigns/drafts', requireAgentScope('campaigns.draft'), createDraft);
Closing the revocation window
Suspending an instance stops new tokens within seconds, but a token already issued stays valid until it expires: at most 15 minutes on high tier, 30 on medium, and 60 on low. To close that window, poll the organization's suspended list every 60 seconds and refuse listed instances. The list answers with a 60-second cache, so a suspension reaches your API within about two minutes.
// A token from a machine-to-machine application in the same organization (section 06, Path C).
// Reuse it until it expires: every token counts toward your allowance.
async function refreshSuspended() {
const res = await fetch(`https://api.algebrix.co/api/organizations/${ORG}/agents/suspended`, {
headers: { Authorization: `Bearer ${await getServiceToken()}` },
});
if (res.ok) suspended = new Set((await res.json()).suspended);
// On failure, keep the last list and alert. For high tier you may prefer to refuse agent calls.
}
await refreshSuspended();
setInterval(refreshSuspended, 60_000);
The list holds suspended instances only. Tokens of instances that expired after a missed review, or were retired, stop being issued but are not listed, so they remain valid until their own expiry.
Agent endpoint reference
These are the endpoints an agent, an API that accepts agent tokens, or an auditor uses. Agent management itself is console-only.
Your organization's token endpoint, as shown on the Integration tab. Agents use three grants:
client_credentials, for ordinary tokens;urn:openid:params:grant-type:ciba, for polling an approval;urn:ietf:params:oauth:grant-type:token-exchange, for acting for a user.
Authentication is private_key_jwt, or a client secret on low tier. Errors are standard OAuth errors (below).
Base URL https://api.algebrix.co. Registers an approval request and its reason. Authenticated with the agent's own bearer token. The body is JSON:
| Field | Type | Notes |
|---|---|---|
scope | string | Required. One of the mandate's approval-required scopes. |
reason | string | Required. 1 to 500 characters, trimmed. Shown to the approver as written by the agent. |
A 201 response returns these fields:
| Response field | Type | Meaning |
|---|---|---|
approvalId | string (UUID) | The approval's ID |
correlationId | string | apr- followed by 16 characters. Send it as binding_message; approvers see it beside the request. |
expiresAt | string (UTC date-time) | The time by which the backchannel request must be sent, about five minutes ahead |
approvalClientId | string | The client ID to authenticate as for the backchannel request and polling |
loginHint | string | Send as login_hint |
backchannelEndpoint | string (URL) | Where to send the backchannel authentication request |
tokenEndpoint | string (URL) | Where to poll |
collapsed | boolean | true when an identical open request was returned instead of a new one |
Error responses, in the order the checks run:
| Status | code | Body or meaning |
|---|---|---|
401 | none | Empty. The token is missing or invalid; the reason is in WWW-Authenticate. |
403 | none | Empty. The token does not belong to an organization. |
400 | none | Problem Details: malformed JSON |
415 | none | Problem Details: missing body or content type |
404 | none | Agent not found. The token is not an active agent's, or belongs to another organization. |
403 | agent_feature_not_in_plan | Human approval is not included in your plan. Starter and above include it. upgradeLifts is true. |
400 | reason_required | Give the reason for this request (1 to 500 characters); the approver sees it, labelled as written by the agent. |
400 | not_an_approval_scope | 'crm.read' is not one of this agent's approval scopes. |
409 | none | Approvals for this agent are still being set up. Try again in a minute. |
The CIBA backchannel authentication endpoint, returned by the approval request. Authenticated as approvalClientId with private_key_jwt. It returns auth_req_id, expires_in, and interval, or a standard CIBA error.
Base URL https://api.algebrix.co. Lists the organization's suspended agent instances, for APIs that accept agent tokens. Requires a bearer token issued by that organization, such as a machine-to-machine application's token.
HTTP/1.1 200 OK
Cache-Control: max-age=60, private
{
"organization": "meridian",
"suspended": ["a3c0e5d2-…"],
"generatedAt": "2026-11-24T13:22:10.872365Z",
"maxAgeSeconds": 60
}
suspendedholds instance IDs, matching thealgebrix_agent_instanceclaim. It lists only suspended instances.401with an empty body means the token is missing or invalid.404Organization not found.means the token belongs to a different organization.
Base URL https://api.algebrix.co. The public key set for verifying evidence packs: a JWKS of ES256 (P-256) keys, including retired keys after a rotation. Cacheable for 300 seconds.
{
"keys": [
{ "kty": "EC", "crv": "P-256", "x": "…", "y": "…",
"kid": "v6NUtRrZflkxmEG-clxpb3Cii-uBuH1A7tG6E3R0p34", "use": "sig", "alg": "ES256" }
]
}
Error reference
The token endpoint returns standard OAuth errors, with error and error_description:
| Situation | Response |
|---|---|
| A scope that is not granted or unknown, or an approval-required scope on an ordinary request | 400 invalid_scope |
A bad or reused assertion, a kid that matches no registered key, a removed key, or the wrong secret | 401 invalid_client |
| The instance is pending acceptance, suspended, or retired | 401 invalid_client |
| The instance expired after a missed review | Refused until the owner confirms. Check the instance's state. |
| Approval not yet decided | 400 authorization_pending |
| Approval denied, or lapsed after 10 minutes | 400 access_denied |
A used auth_req_id, or an invalid exchange | A standard OAuth error such as invalid_grant. Treat it as final. |
| The plan's machine-to-machine token allowance is exhausted and issuance is paused | Refused until the next month or an upgrade (section 13) |
The Algebrix agent endpoints return the platform's message body for business refusals:
{
"message": "Human approval is not included in your plan. Starter and above include it.",
"upgradeLifts": true,
"code": "agent_feature_not_in_plan"
}
code is a stable, machine-readable value. It is present on the refusals listed in this section, and absent on some others, so branch on code when it is present and on the status code otherwise. upgradeLifts is true only when a higher plan removes the refusal. Messages are written for people and may be reworded.
code | Status | Meaning |
|---|---|---|
agent_feature_not_in_plan | 403 | The account's plan does not include the feature. The message names the plan that does: human approval needs Starter; acting for users and evidence packs need Growth. |
reason_required | 400 | The approval request has no reason, or one over 500 characters |
not_an_approval_scope | 400 | The scope is not one of the mandate's approval-required scopes |
Every refused token request is also recorded in the instance's Activity, grouped by scope and reason. Check there when a response does not make the cause clear.
Verifying an evidence pack
An evidence pack can be verified by anyone holding it, with no access to Algebrix. Verification proves that the pack was signed by Algebrix, and that no recorded event in it was changed, removed, or reordered.
Download the JSON and the PDF from the console. Check that the SHA-256 of the JSON matches the one printed in the PDF:
shasum -a 256 evidence-pack.json
Fetch the published key set from https://api.algebrix.co/.well-known/algebrix-evidence-keys. Always use this published URL. The pack names a key URL in signature.keysUrl for reference, but that member is not covered by the signature, so never fetch keys from it.
Verify the pack signature, every event hash, and every checkpoint, using the rules below or the reference verifier.
Pack structure
A pack's JSON has format: "algebrix-evidence-pack/1". A pack can contain further members; verification depends only on those in this table.
| Member | Meaning |
|---|---|
packId, generatedAt | The pack's ID and creation time |
scope, range | The account, organization, and instances covered, and the date range |
coverage | How current the record is (eventsIngestedThrough) and a statement of coverage |
disclosures | The statements every pack carries |
instances[] | Per agent: passport, mandate history, approvals, standing approvals, token summaries, chain, and events |
instances[].chain | startPrevHash, firstSequence, lastSequence, lastHash, headSequence, headHash, and anchors[]. The first four are null when the range holds no events. |
instances[].events[] | Each event, with its sequence, time, type, actor, outcome, details, prevHash, and hash |
signature | alg (ES256), kid, keysUrl, and value |
Times are UTC, with six decimal places.
Verification rules
| What | Rule |
|---|---|
| Canonical form | JSON Canonicalization Scheme (RFC 8785), encoded as UTF-8 |
| Pack signature | ES256 over the canonical pack without its signature member, verified with the key whose kid matches signature.kid |
| Signature encoding | The raw 64-byte r || s value, base64url-encoded. Each kid is the RFC 7638 thumbprint of its key. |
| Event hash | Lowercase hex SHA-256 of the 32 bytes of the previous hash, followed by the canonical event. The canonical event is the event's members without prevHash and hash, plus the member "v": 1, which the pack omits. |
| Chain | Within each instance, in sequence order, each event's prevHash must equal the previous event's hash. The first event's prevHash equals chain.startPrevHash, which is 64 zeros at the start of an agent's life. The last event's hash must equal chain.lastHash. |
| Checkpoints (anchors) | Each anchor has instanceId, anchoredAt, chainHeadSequence, chainHeadHash, eventCount, kid, and signature. Its signature is ES256 over the canonical anchor without signature, plus "v": 1. Where the pack holds the event at chainHeadSequence, its hash must equal chainHeadHash. |
| Aged-out records | When records leave the retention period, the removal is itself recorded, and the chain verifies from that point |
Reference verifier (Node.js)
// node verify-evidence-pack.mjs evidence-pack.json [keys.json]
// Node.js 18+, and: npm install canonicalize
import { readFile } from 'node:fs/promises';
import { createHash, createPublicKey, verify } from 'node:crypto';
import canonicalize from 'canonicalize';
// Always the published key set, never a URL taken from the pack.
const KEYS_URL = 'https://api.algebrix.co/.well-known/algebrix-evidence-keys';
const [packPath, keysPath] = process.argv.slice(2);
const pack = JSON.parse(await readFile(packPath, 'utf8'));
const jwks = keysPath
? JSON.parse(await readFile(keysPath, 'utf8'))
: await (await fetch(KEYS_URL)).json();
const problems = [];
const bytes = (value) => Buffer.from(canonicalize(value), 'utf8');
const without = (obj, ...names) =>
Object.fromEntries(Object.entries(obj).filter(([k]) => !names.includes(k)));
function es256Valid(kid, value, signature) {
const jwk = jwks.keys.find((k) => k.kid === kid);
if (!jwk) return false;
return verify('sha256', bytes(value),
{ key: createPublicKey({ key: jwk, format: 'jwk' }), dsaEncoding: 'ieee-p1363' },
Buffer.from(signature, 'base64url'));
}
// 1. The pack signature covers the whole pack except its signature member.
const { signature } = pack;
if (signature?.alg !== 'ES256' || !es256Valid(signature.kid, without(pack, 'signature'), signature.value)) {
problems.push('pack signature does not verify');
}
for (const instance of pack.instances ?? []) {
const { chain } = instance;
const events = [...(instance.events ?? [])].sort((a, b) => a.sequence - b.sequence);
const hashAt = new Map();
// 2. Each event's hash covers the previous hash and the event itself.
let prev = chain?.startPrevHash ?? '0'.repeat(64);
for (const event of events) {
if (event.prevHash !== prev) problems.push(`${instance.id} #${event.sequence}: chain broken`);
const canonical = { ...without(event, 'prevHash', 'hash'), v: 1 };
const hash = createHash('sha256')
.update(Buffer.concat([Buffer.from(prev, 'hex'), bytes(canonical)]))
.digest('hex');
if (hash !== event.hash) problems.push(`${instance.id} #${event.sequence}: event altered`);
hashAt.set(event.sequence, event.hash);
prev = event.hash;
}
if (events.length && chain?.lastHash !== prev) {
problems.push(`${instance.id}: last hash does not match the chain`);
}
// 3. Each anchor is a signed checkpoint of the chain head.
for (const anchor of chain?.anchors ?? []) {
if (!es256Valid(anchor.kid, { ...without(anchor, 'signature'), v: 1 }, anchor.signature)) {
problems.push(`${instance.id}: anchor at #${anchor.chainHeadSequence} not signed`);
}
const seen = hashAt.get(anchor.chainHeadSequence);
if (seen && seen !== anchor.chainHeadHash) {
problems.push(`${instance.id}: anchor at #${anchor.chainHeadSequence} does not match`);
}
}
}
if (problems.length) {
console.log('NOT VERIFIED');
problems.forEach((p) => console.log(' - ' + p));
process.exit(1);
}
console.log('VERIFIED');
console.log('coverage:', pack.coverage?.statement ?? '(none)');
Changing a single character of any event makes verification fail. A VERIFIED result proves the integrity of the record. As every pack states, token events show what the agent was allowed to attempt, not what it did.
Rotating keys
- Uploaded keys: add the new public key on the Credential tab with an overlap window, from 0 to 168 hours (24 by default). During the overlap both keys are accepted, so switch the agent to the new key and its new
kidat any point within it. An overlap above 0 requires the new key to use the same algorithm as the old one; an overlap of 0 retires the old key at once. - JWKS URL: publish the new key alongside the old one, switch the agent to the new
kid, and remove the old key once nothing uses it. - Suspected compromise: mark the key compromised on the Credential tab. It is refused within about five seconds. The last remaining key cannot be removed, so rotate first, or suspend the agent.
- Schedule: high tier shows a 90-day rotation date, and the governance card flags any credential older than 90 days.
Integration checklist
- The client ID, token URL, and key ID are copied from the console, not constructed.
- The private key is in a secrets manager, one key per customer instance.
- Every assertion names its
kid, has a freshjti, and expires within 60 seconds. - No
resourceparameter is sent, and only granted scopes are requested. - Tokens are reused until shortly before they expire.
- The agent handles
invalid_scope,invalid_client,access_denied, and the agent endpoint codes without retrying in a loop. - Approval reasons are specific, and free of secrets and personal data.
- Every receiving API checks issuer, audience, expiry, agent identity, and scopes; logs the instance ID,
sub, andjti; and, on high tier, checks the suspended list. - You have tested a refused scope, an approval that is denied and one that is approved, and a suspension, and seen each in Activity.
- If you deliver evidence packs, you have verified one with the published key set.
09 OIDC endpoints
All paths below are relative to https://auth.algebrix.co/{organization}. The organization segment is required on every one of them.
Discovery document. Publishes the issuer, endpoint locations, supported scopes, and signing algorithms. Fetch it at startup rather than hardcoding endpoints.
Authorization endpoint. The browser redirect target that begins sign-in.
Token endpoint. Exchanges an authorization code, a refresh token, or client credentials for tokens.
Returns claims about the authenticated user. Requires a bearer access token.
JSON Web Key Set. It holds a signing key (use: sig, RS256) and an encryption key (use: enc). Verify signatures with the key matching the token's kid. Cache the keys, and refresh when you see an unknown key ID.
Ends the session. Sign-out is shared across every application in the organization. A post_logout_redirect_uri is accepted only if it is registered as one of the application's sign-in redirect URIs; otherwise the identity server shows an "Invalid redirect uri" page and does not redirect.
Revokes a refresh token so it can no longer be used. Revoking an access token does not stop the management API accepting it before it expires. See section 05.
The discovery document advertises the full capability of the underlying authorization server, which is broader than what is documented here. For example, it lists a registration endpoint, additional scopes, and additional client authentication methods. Endpoints, grants, and scopes absent from this document are not covered by support. If you need one of them, raise it with Algebrix before building against it.
10 Management API
Base URL https://api.algebrix.co. Every endpoint under /api/admin requires a user access token carrying the admin role (section 05). Every operation is scoped to the organization the token was issued for. Paths carry no organization segment, and none should be added. An identifier belonging to another organization resolves to 404, never to someone else's record.
Authorization: Bearer {access_token}
Conventions
| Topic | Behaviour |
|---|---|
| Content type | Request bodies are application/json; any other content type returns 415. File uploads are multipart/form-data with the field name file. JSON responses are application/json; charset=utf-8, and CSV downloads are text/csv. |
| Field names | Responses use camelCase. Request property names are matched case-insensitively. |
| Unknown fields | Unknown request properties and query parameters are ignored, not rejected. A misspelled field produces a success that changes nothing, so check responses rather than status codes alone. |
| Timestamps | UTC, ISO 8601, with a Z suffix. Sub-second precision varies (for example 2026-09-25T08:10:50.42Z), and session timestamps are whole seconds. Parse with a standard ISO 8601 parser rather than a fixed pattern. |
| Date filters | yyyy-MM-dd, interpreted as UTC |
| Paging | 1-based page. The page-size parameter and its limits are given per endpoint. Out-of-range values are clamped to the nearest valid value rather than refused. |
| Rate limits | None are applied to the management API or the OIDC endpoints in this version. Limits may be introduced later, so handle 429 with backoff. |
Users
Lists users. The response shape depends on whether any query parameter is sent. With no parameters, it returns a bare array of every AdminUser in the organization, unpaged. With any parameter, it returns an AdminUserPage. Use the paged form for any directory of meaningful size.
| Parameter | Type | Notes |
|---|---|---|
page | integer | 1-based, default 1 |
size | integer | Default 25, maximum 200 |
search | string | Case-insensitive substring match across username, first name, last name, and email. A term in double quotes, "david.lee", matches exactly. |
status | string | enabled, disabled, or all (the default). Any other value returns 400. |
role | string | admin, manager, or end-user. Cannot be combined with search or status; the combination returns 400. When role is sent, totalCount and totalPages are null, so paginate with hasNextPage. |
Paged results are ordered by username, ascending. There is no filter for multi-factor state; read mfaEnabled on each user instead.
Creates a user. The body is CreateUserRequest. Returns 201 with the created AdminUser. The temporary password must be changed by the user at first sign-in, and it must satisfy the organization's password policy.
Refusals:
409for a duplicate username or email.409withupgradeLifts: truewhen a plan user limit is reached (section 13).400when the identity server rejects the user, for example a username below the minimum length or a password that fails the policy.
Returns one AdminUser. The id is the sub claim of that user's tokens.
Returns UserDetail: the user, together with whether they are the organization's last administrator and which applications they have used.
Returns audit and sign-in entries concerning this user, as an AuditPage, within the retention window. Parameters: page, and pageSize (default 20). An identifier with no recorded activity returns an empty page rather than 404, and this includes an identifier that does not exist.
Updates profile fields. The body is UpdateUserRequest. Returns the updated AdminUser. The username cannot be changed.
Permanently removes the user, together with their sign-in record. Returns 204. Prefer disabling where a record of the account must survive.
Enables or disables sign-in. The body is {"enabled": boolean}. Returns the updated AdminUser. A disabled user cannot authenticate, but keeps their record, role, and multi-factor enrolment.
Assigns a role. The body is {"role": "admin" | "manager" | "end-user"}. Returns the updated AdminUser. Roles are exclusive, so assigning one replaces the previous one.
Clears the user's authenticator, for recovery when a device is lost. Returns the updated AdminUser. Returns 409 if the user has no authenticator to clear.
Clearing does not by itself make the user enrol again. They can then sign in with a password alone. Unless multi-factor enforcement applies to their role, follow the clear with a CONFIGURE_TOTP required action.
Required actions and password reset
Requires the user to complete an action at their next sign-in. The body is {"action": "UPDATE_PASSWORD" | "CONFIGURE_TOTP"}. Values are case-sensitive, and any other value returns 400. Returns 200 with {"userId": "…", "pending": ["UPDATE_PASSWORD", "CONFIGURE_TOTP"]}, listing every action the user now owes.
- Actions are additive: requiring a second action keeps the first.
- The identity server decides the order in which pending actions are shown.
- Each action clears itself once completed.
- Actions can be set on a disabled user, so you can queue a password change before enabling the account.
Emails the user a link to set a new password. There is no request body. Returns 204.
- The link is valid for 24 hours, and the previous password stops working once the new one is set.
- The email is the account-action email (section 14), not the "Forgot password?" email.
- A disabled user returns
400; enable the account first. 502means the mail relay did not accept the message, so nothing was sent.
Invitations
Inviting someone creates their user account immediately, with no password, and emails them a link to choose one. They appear in the users list from that moment. Following the link proves the email address, so the account is marked verified when they finish. An invitation's status is derived from the account: pending until the password is set, accepted after, and revoked if withdrawn. Invitation links are valid for 72 hours.
Returns a bare array of Invitation. status is pending (the default), accepted, or revoked. Capped at 100 per status.
Invites a person. The body is {"email": "…", "role": "admin" | "manager" | "end-user"}; role defaults to end-user. Returns 200 with the Invitation.
Refusals, each 400 with a message naming the cause:
- a pending invitation already exists for the address, so resend it instead;
- a user with the address already exists;
- the role is invalid.
An address whose earlier invitation was revoked can be invited again. The invitation counts against the stored-user limit (section 13).
Sends the email again to the existing account. It never creates a second account. Returns 200 with the Invitation, with lastSentAt updated.
Revokes a pending invitation. This deletes the account the invitation created, the emailed link stops working, and the stored-user allowance is released.
An accepted invitation cannot be revoked, because it is now a working account; disable or delete the user instead. An unknown id returns 404.
Import and export
Downloads a sample import file with the header username,email,firstName,lastName,role.
A dry run. It validates the uploaded file and creates nothing. Returns CsvPreview, which gives the total and valid rows, the room remaining under the stored-user limit, any shortfall, and a failure for each invalid row. The dry run does not refuse a file for exceeding the limit; the commit refuses the rows that do not fit.
Commits the file. Partial success is the defined behaviour. Valid rows are created and failed rows are reported, and the response is always 200 with CsvCommit. Each row goes through the same validation and plan limits as POST /api/admin/users. failureReportCsv holds the failed rows with an error column, ready to correct and import again.
Exports every user as CSV, with the columns username,email,firstName,lastName,role,status,mfa,createdAt. The export is designed to round-trip: the importer ignores the read-only columns. Existing users in a re-imported file are refused as duplicates rather than updated, so a round trip adds new rows only. The last sign-in time is not exported.
Import file rules
| Rule | Value |
|---|---|
| Format | RFC 4180 CSV. Quoted fields may contain commas and line breaks. |
| Columns | username, email, and role are required; firstName and lastName are optional. role must be admin, manager, or end-user. A blank or unknown role fails that row and is never defaulted. There is no password column. |
| File size | Under 1,024 KB |
| Rows | At most 500 data rows. The limit is enforced while parsing, because a quoted field can contain a line break, so counting lines in advance would miscount. Larger files are refused before any user is touched. |
| Line numbers | Failures report the file line: the header is line 1, and the first data row is line 2. |
An imported user is created with no password, owing UPDATE_PASSWORD, and with an unverified email address. No email is sent. Imported users cannot sign in until you send each of them a password reset email (POST /api/admin/users/{id}/password-reset). This version has no way to email all imported users at once. Imported users do not appear as invitations.
Sessions
Returns SessionList: every active session in the organization, capped at 500. truncated is true when the cap is reached.
Returns SessionList for one user. This list is complete.
Ends one session. Returns 204, including for a session that has already ended.
Ends every session for the user. Returns 200 with {"revoked": n}.
Revoking a session signs the user out and stops its refresh token immediately. An access token already issued from that session remains valid until it expires, which is at most the organization's access token lifetime (accessTokenLifespanSeconds in the list response). For a suspected compromise, revoke the sessions and disable the user.
Some further details:
- A session used across several applications appears once.
- Offline sessions are not included.
- A session's
idequals thesidclaim of tokens issued from it.
Branding
Returns LogoInfo for the organization's sign-in logo.
Uploads the logo as multipart field file, replacing any existing logo. Returns 200 with LogoInfo.
Rules, each refused with 400 and a message naming the limit:
- PNG or JPG only, detected from the file's contents rather than its name or declared type;
- SVG is refused, because an SVG can carry script;
- at most 512 KB;
- at most 2,000 by 2,000 pixels.
Removes the logo. Returns 200. Returns 409 if there is no logo to remove.
Returns the organization's sign-in logo image, with no authentication. If no logo is uploaded, it returns the default Algebrix mark as SVG.
An unknown identifier also returns the default mark, byte-identical, so the endpoint cannot be used to discover which organizations exist.
An uploaded logo carries ETag and Cache-Control: no-cache, must-revalidate, so a replacement shows promptly. The default mark is cacheable for 300 seconds.
The logo appears on the organization's sign-in and multi-factor enrolment pages, at a fixed height. It does not appear in emails, which carry a text header only. Colours, backgrounds, and wording are configured by Algebrix on request.
Audit log and sign-in activity
Two separate trails are kept:
- The audit log records administrative actions, such as creating a user, changing a role, rotating a secret, or changing billing.
- Sign-in activity records authentication events.
Both are kept for the plan's retention window (section 13). Each response carries retentionDays, so read the window from there rather than hardcoding it.
Returns an AuditPage of administrative actions.
| Parameter | Notes |
|---|---|
actor | Case-insensitive substring of the acting administrator's username. % and _ are matched literally. |
action | Exact action name, from the actions endpoint below |
target | Substring of the target's username |
from | Date, inclusive, UTC |
to | Date, exclusive, UTC. from=2026-09-25&to=2026-09-25 returns nothing; to include the 25th, send to=2026-09-26. This failure is silent, so it is worth getting right. |
page, pageSize | pageSize defaults to 20, maximum 100 |
Returns a bare array of every administrative action name. Use this list rather than a hardcoded catalogue, because new actions are added as the platform grows.
Downloads the audit log as CSV. It takes the same filters as the list and honours every one, so the file matches the filtered view row for row. The columns are Timestamp,ActorUsername,Action,TargetUsername,Metadata, with Metadata as a CSV-quoted JSON object.
Returns an AuditPage of sign-in activity. Filters: actor, action, from, to, with the same semantics and paging as the audit log.
- There is no outcome filter; filter by
action=LOGIN_SUCCESSoraction=LOGIN_FAILUREinstead. - Events are collected every 30 seconds (
ingestionIntervalSeconds), so a new sign-in can take up to that long to appear. This is not a live feed. - There is no CSV export for sign-in activity.
Returns the sign-in action names: LOGIN_SUCCESS, LOGIN_FAILURE, LOGOUT, MFA_ENROLLED. A failed sign-in carries the reason in metadata.error, for example invalid_user_credentials.
More about both trails:
- Every entry names the person who acted. Refused or failed operations write no entry.
- Metadata keys are camelCase.
- A user's own activity (
/api/admin/users/{id}/activity) deliberately shows both kinds together: their sign-ins alongside the actions taken on them.
Audit and session records include an ipAddress value. In this version it can record an address inside the Algebrix network rather than the originating client, so do not rely on it to identify a caller.
11 Schemas
AdminUser
{
"id": "a87a5de8-1ab3-4716-b86a-3104f3f277f2",
"username": "david.lee",
"email": "[email protected]",
"firstName": "David",
"lastName": "Lee",
"enabled": true,
"roles": ["end-user"],
"mfaEnabled": false,
"createdAt": "2026-09-18T08:15:54.42Z",
"lastSignInAt": "2026-09-19T11:02:10.503Z"
}
| Field | Notes |
|---|---|
id | Stable and permanent. Equal to the sub claim. |
roles | An array holding the user's single role |
mfaEnabled | Whether a TOTP authenticator is enrolled |
lastSignInAt | The most recent successful sign-in, or null. It is kept independently of audit retention. null does not mean "never signed in": it means no sign-in has been recorded since sign-in tracking began for the organization. |
AdminUserPage
{
"items": [ /* AdminUser */ ],
"page": 1,
"size": 25,
"totalCount": 312, // null when filtered by role
"totalPages": 13, // null when filtered by role
"hasNextPage": true,
"signInHistoryDays": 90 // the per-user activity window
}
CreateUserRequest
| Field | Type | Notes |
|---|---|---|
username | string | Required. The sign-in identifier. It cannot be changed later. |
email | string | Required |
firstName | string | |
lastName | string | |
temporaryPassword | string | Required. Must satisfy the organization's password policy, and must be changed by the user at first sign-in. |
A new user holds no role until one is assigned with PUT /api/admin/users/{id}/role.
UpdateUserRequest
| Field | Type | Notes |
|---|---|---|
email | string | Required |
firstName | string | Optional |
lastName | string | Optional |
UserDetail
{
"user": { /* AdminUser */ },
"isLastAdministrator": false,
"signInHistoryDays": 90,
"applicationsInUse": ["billing-portal", "mobile-app"]
}
applicationsInUse lists client IDs. Check isLastAdministrator before disabling, deleting, or changing the role of an administrator, so the organization is not left without one.
Invitation
{
"id": "7a5a5053-8d98-4909-bde7-d4e3e3dddc10",
"email": "[email protected]",
"role": "end-user",
"status": "pending",
"invitedBy": "[email protected]",
"createdAt": "2026-09-25T08:18:18.7939597Z",
"lastSentAt": "2026-09-25T08:18:18.7939601Z",
"acceptedAt": null,
"revokedAt": null,
"emailDelivered": true
}
SessionList
{
"sessions": [
{
"id": "w9rZQFadZ0Zyqo8_t7PJsLq_",
"userId": "a87a5de8-1ab3-4716-b86a-3104f3f277f2",
"username": "david.lee",
"ipAddress": "203.0.113.10",
"startedAt": "2026-09-25T08:16:14Z",
"lastAccessAt": "2026-09-25T08:16:14Z",
"applications": ["billing-portal"]
}
],
"accessTokenLifespanSeconds": 300,
"truncated": false
}
applications lists client IDs.
AuditPage
This shape is returned by the audit log, sign-in activity, and per-user activity endpoints.
{
"items": [
{
"id": "cd147816-…",
"timestamp": "2026-09-25T08:21:11.764Z",
"actorUserId": "a87a5de8-…",
"actorUsername": "david.lee",
"action": "LOGIN_FAILURE",
"targetUserId": null,
"targetUsername": null,
"metadata": { "error": "invalid_user_credentials" }
}
],
"totalCount": 15,
"page": 1,
"pageSize": 20,
"totalPages": 1,
"retentionDays": 90,
"ingestionIntervalSeconds": 30 // 0 on the administrative log, written synchronously
}
CsvPreview
{
"fileName": "users.csv",
"totalRows": 4,
"validRows": 3,
"remainingStoredUsers": 9992,
"shortfall": null,
"failures": [
{ "line": 3, "username": "g.two", "email": "not-an-email", "firstName": "G",
"lastName": "Two", "role": "end-user", "reason": "'not-an-email' is not a valid email address." }
],
"failureReportCsv": null
}
CsvCommit
{
"fileName": "users.csv",
"totalRows": 3,
"created": 2,
"failed": 1,
"failures": [ /* as in CsvPreview */ ],
"failureReportCsv": "username,email,firstName,lastName,role,error\r\n…"
}
LogoInfo
{
"hasLogo": true,
"contentType": "image/png",
"width": 240,
"height": 80,
"byteSize": 296,
"updatedAt": "2026-09-25T08:33:17.5027867Z"
}
12 Errors
Response bodies differ by failure type. Handle every shape below rather than assuming a single envelope, and branch on the status code and on the machine-readable fields, not on message text. Messages are written for people and may be reworded.
| Status | Meaning | Body |
|---|---|---|
200, 201, 204 | Success | The documented resource, or empty for 204 |
400 | Invalid input, or a business rule refused the request | A message body, or a validation Problem Details object for malformed input |
401 | Missing, expired, or otherwise invalid token | Empty. The reason is in the WWW-Authenticate header. |
402 | Administrative write blocked because the subscription is unpaid | message and billingState |
403 | Valid token without the required privilege: no admin role, a machine token, or an account-level operation | Empty, with no WWW-Authenticate header. The status code is the signal. |
404 | No such resource in your organization | A message body, or a Problem Details object. An unrouted path returns an empty body. |
409 | Conflict: a duplicate, nothing to remove, or a plan limit reached | A message body. upgradeLifts is true for plan limits. |
415 | The request body is not application/json | Problem Details |
429 | Too many requests | Empty. Not applied to the management API in this version; handle it anyway. |
500 | Unexpected server-side failure | Quote the traceId, if present, when contacting support |
502 | An email could not be handed to the mail relay, so nothing was sent | A message body |
Message body
This shape is used for business-rule refusals with 400, 404, 409, and 502:
{
"message": "Your plan (Free) includes 3 applications and you have 3. Starter includes 10.",
"upgradeLifts": true
}
upgradeLifts is true only when moving to a higher plan removes the refusal, and false for every other refusal. Use it to decide whether to route a person to upgrading.
Validation Problem Details
This shape is returned for malformed input, such as an invalid email format, a missing required field, a missing upload, or malformed JSON:
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": { "Email": ["The Email field is not a valid e-mail address."] },
"traceId": "00-cdb2562e8941de77...-86ee0d1ec5ff51e3-00"
}
404 Not Found
Most not-found responses use the message body, for example {"message": "User not found.", "upgradeLifts": false}. GET /api/admin/users/{id} returns an RFC 9457 Problem Details object instead:
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Not Found",
"status": 404,
"traceId": "00-df7c6aa7...-00"
}
Handle both shapes by status code.
401 Unauthorized
The body is empty. The diagnostic is in the response header, per RFC 6750:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer error="invalid_token",
error_description="The issuer '...' is invalid"
With no token at all, the header is simply Bearer. An empty body here is expected behaviour, not a fault.
402 Payment Required
{
"message": "A payment failed and the grace period has ended, so administrative changes are paused. Update your payment details in Billing to resume, or contact [email protected].",
"billingState": "grace_expired"
}
billingState is one of trial_failed, grace_expired, or canceled. See section 13.
Diagnosing a failed call
| Symptom | Likely cause |
|---|---|
404 on every identity endpoint | Uppercase characters in the organization identifier, or a misspelling |
Discovery returns 200, everything else 404 | The organization identifier does not exist |
404 on /{organization}/protocol/openid-connect/… | Under the organization prefix, the endpoints are /{organization}/oauth2/…. See section 09. |
| Library refuses to start, with an issuer mismatch | The authority is configured with the path form instead of the published issuer value. See section 05. |
| Sign-in shows an error page reading "Invalid parameter: redirect_uri" and never returns to the callback | The redirect URI is not registered on the application, or does not match it exactly. Nothing is sent to the unregistered address. |
| Sign-out shows "Invalid redirect uri" | The post_logout_redirect_uri is not registered as a sign-in redirect URI. There is no separate post-logout list. |
invalid_request: "Missing parameter: code_challenge_method" or "code challenge method is not matching the configured one" | A single-page or native application sent no PKCE challenge, or sent plain. Use S256. |
401 unauthorized_client on the token endpoint | Wrong client secret, or a secret that has since been rotated |
401 invalid_client on the token endpoint | The client ID does not exist in this organization |
login_required, with no description, on a prompt=none request | The user has no active session. Send them through interactive sign-in. |
Refresh fails with invalid_grant, "Session not active" | The session ended: idle sign-out, maximum session length, or sign-out from any application in the organization |
400 on the token endpoint | The redirect URI differs from the one used at authorization, or the PKCE verifier does not match the challenge |
401 with an issuer message | The token was not issued by Algebrix Identity, or its organization is not recognised |
403 on /api/admin | The user does not hold admin, or the token is a machine-to-machine token. Machine tokens cannot call the management API. |
403 on an account-level route | Organizations, billing, and usage are console-only for account administrators |
404 on a user you know exists | The user belongs to a different organization than the token. Operations never cross organizations. |
401 on the token endpoint for a machine application, while others work | The account's monthly machine token allowance is exhausted and machine token issuance is paused. See section 13. |
409 with upgradeLifts: true | A plan limit has been reached |
402 on a write that used to succeed | The subscription is unpaid. Reads still work. |
| A request succeeds but changes nothing | A misspelled field. Unknown fields are ignored, not rejected. |
| Audit query returns nothing for today | to is exclusive. Send the following day. |
| Password refused at the set-password page although it looks strong | The organization's password policy requires a rule the password misses. The page lists every rule. |
| Correct password refused after several failures | Brute-force protection has locked the account temporarily. An administrator can unlock it from the console. |
| Users are unexpectedly prompted to enrol an authenticator | Multi-factor enforcement was turned on for their role |
Agent token request returns 400 invalid_scope | A requested scope is not in the mandate or is unknown, or it is approval-required. Approval-required scopes are issued only through the approval flow (section 08). |
Agent token request returns 401 invalid_client | A bad or reused assertion, the wrong key or secret, or the instance is pending acceptance, suspended, or retired. Check the instance's state and Activity. |
Approval request returns 403 agent_feature_not_in_plan | The account's plan does not include the feature. Human approval needs Starter; acting for users and evidence packs need Growth. |
Polling an approval returns access_denied | The request was denied, or lapsed after 10 minutes without a decision. Start a new request if the action is still needed. |
| A token exchange is refused | Delegation is off, the user or their application is outside the instance's delegation settings, or a scope is not in the user's token |
The suspended list returns 404 | The bearer token belongs to a different organization than the one in the path |
An evidence pack prints NOT VERIFIED | The file was changed after it was produced, or the keys did not come from the published key set. Download the pack again from the console. |
| Your API refuses a valid-looking agent token | Its aud does not contain your API's identifier. Add the API to the mandate's audiences, then request a new token. |
13 Plans, limits, and billing
Allowances belong to the account and are shared across all of its organizations. Current usage against every allowance is shown in the console.
| Free | Starter | Growth | Scale | |
|---|---|---|---|---|
| Organizations | 1 | 5 | 25 | 50 |
| Applications (all types) | 3 | 10 | 50 | 100 |
| Machine-to-machine tokens per calendar month | 500 | 2,000 | 5,000 | 15,000 |
| Monthly active users | 10,000 | 25,000 | 50,000 | 100,000 |
| Console administrators | 1 | 3 | 10 | 25 |
| SSO connections | 3 | 5 | 10 | 25 |
| Audit, sign-in, and agent record retention | 7 days | 30 days | 90 days | 365 days |
| Agent classes | 1 | 3 | 10 | 25 |
| Live agent instances | 1 | 10 | 50 | 100 |
| Human approval for agents | No | Yes | Yes | Yes |
| Agents acting for users | No | No | Yes | Yes |
| Agent evidence packs | No | No | Yes | Yes |
Scale is a negotiated plan: its figures are included amounts, not ceilings, and never block.
How each allowance is measured and enforced
| Allowance | Behaviour |
|---|---|
| Organizations | Creation is refused at the allowance with 409, upgradeLifts: true. |
| Applications | Every customer application counts, machine-to-machine included. The platform-managed console application does not. Creation is refused at the allowance with 409. |
| Monthly active users | Distinct users who signed in during the current calendar month. Machine applications and agents are excluded.
|
| Agent classes, instances, and features | Agent identities are included on every plan. Agent classes and live instances have their own allowances, separate from applications. At the limit, creation is refused and the upgrade prompt names the plan that lifts it. Retired classes and instances do not count.
|
| Stored users (Free) | Free organizations can hold up to 10,000 users in the directory. At that limit, creating, inviting, or importing a user is refused with 409, naming the plan that lifts the limit. Invitations and imported users count, because they create directory users. |
| Machine-to-machine tokens | Tokens issued through the client credentials grant in the calendar month, including agent tokens. A warning is shown at 80% of the allowance, and the account is emailed at 100%.
|
| Console administrators, SSO connections | Published allowances. They are not enforced at creation in this version. Enterprise SSO is set up with Algebrix assistance. |
| Retention | Audit and sign-in activity records older than the window are removed. Aggregated sign-in statistics are kept, so usage figures are unaffected, and lastSignInAt is not bounded by the window. Organizations on an invoiced agreement retain records for 45 days. If you have compliance retention requirements, export within your window. Read retentionDays from the audit responses rather than relying on this table. Agent records follow the same periods, with 12 months on Scale; an evidence pack covers only what is still retained. |
Plan changes
Plan changes are made in the console by an account administrator. You can move between paid plans and switch between monthly and annual billing.
- A downgrade is refused if current usage exceeds the target plan, and the refusal names the dimension.
- Moving from a paid plan to Free is not possible. Cancelling is the exit from a paid plan.
Billing restrictions
If a subscription goes unpaid, administrative changes are paused. Nothing else is. Understand this before you build, because it determines what your integration can and cannot do in that state.
Your users keep signing in. Token issuance and every OIDC endpoint are unaffected in every unpaid state. No token is revoked and no session is ended. A billing problem is never allowed to take down authentication for people who have no idea one exists.
Reads keep working. Every GET under /api/admin continues to return data, so you can still list users and export the audit log.
What pauses is every write under /api/admin: creating, updating, disabling, or deleting users; roles and required actions; password reset emails; invitations; CSV import, including the dry run; session revocation; logo changes; and clearing multi-factor enrolment. Each returns 402. Writes resume automatically, within about a minute of a successful payment.
- The restriction is account-wide. One unpaid subscription pauses writes in every organization of the account.
- A trial that ends without a successful payment restricts writes immediately, reported as
trial_failed. - When an established subscription's payment fails, there is a seven-day grace period from the first failure, during which everything works normally. After that, it is reported as
grace_expired. Retries do not extend the grace period. - A cancelled subscription is reported as
canceled. - Organizations on an invoiced agreement, including Enterprise, are billed separately and are never restricted.
Administrators see the current state, and the date on which access will be restricted, in the console. If your operations team monitors integrations rather than the console, treat a 402 as the signal to check billing.
14 Security settings and the end-user experience
Administrators configure these settings per organization in the console. Changes take effect immediately and are recorded in the audit log. They are not available through the API in this version, but they change what your users and your integration experience, so they are documented here.
Password policy
| Rule | Weak | Medium | Strong |
|---|---|---|---|
| Minimum length | 8 | 10 | 12 |
| Upper case, lower case, digit | Not required | 1 of each | 1 of each |
| Special character | Not required | Not required | 1 |
| Must differ from the username | Yes | Yes | Yes |
| Cannot repeat recent passwords | No | Last 3 | Last 5 |
| Expiry | None | None | None |
- New organizations use Medium. Organizations created before this default was introduced have no password policy until an administrator selects one, and the console says so.
- A policy applies when a password is next set or changed. Existing passwords are not re-checked, and nobody is forced to change theirs.
- Rules beyond the three levels, such as a longer minimum or a blocklist, are configured by Algebrix on request.
Brute-force protection
Brute-force protection is off by default. When it is on, an account is locked temporarily after a number of consecutive failed sign-ins, and while it is locked even the correct password is refused. Each further failure doubles the lockout, up to the maximum. Administrators see locked accounts in the console and can unlock them. The list can lag by up to 30 seconds.
| Setting | Range | Default when first enabled |
|---|---|---|
| Failures before lockout | 3 to 100 | 30 |
| First lockout | 10 to 3,600 seconds | 60 seconds |
| Maximum lockout | 60 to 86,400 seconds | 900 seconds |
| Permanent lockout | On or off | Off |
Session and token lifetimes
| Setting | Range | Default |
|---|---|---|
| Access token lifetime | 60 to 3,600 seconds | 300 seconds |
| Idle sign-out | 300 to 2,592,000 seconds | 1,800 seconds |
| Maximum session length | 600 to 2,592,000 seconds | 36,000 seconds |
Some constraints link these settings:
- The maximum session length cannot be shorter than the idle sign-out.
- An access token never outlives its session.
- The access token lifetime is also how long a revoked session's last access token remains usable, which is why it is capped at one hour.
Multi-factor authentication
| Enforcement | Effect |
|---|---|
| Off (default) | No one is required to enrol |
| Administrators | Every user holding admin must enrol a TOTP authenticator at their next sign-in |
| Everyone | Every user must enrol at their next sign-in |
- Turning enforcement off does not remove anyone's authenticator.
- Enforcement is independent of the per-user
CONFIGURE_TOTPrequired action, which works in every mode. - A TOTP code is single-use. The code used to enrol cannot also be used to sign in within the same 30-second window, which can look like a failed sign-in during testing.
Self-registration
Self-registration is off by default. When it is on, a Register link appears on the organization's sign-in page, and people who register count towards the plan's user allowances. Email verification can be required for people who register. Invited people already prove their address by following the emailed link.
What your users see
- Sign-in and enrolment pages carry the organization's logo, if one is uploaded.
- There is no end-user account page.
https://auth.algebrix.co/realms/{organization}/accountreturns404. Users change their password through the "Forgot password?" link, a password reset email, or anUPDATE_PASSWORDrequired action. - Users enrol an authenticator only when enforcement or a
CONFIGURE_TOTPrequired action asks them to. They cannot enrol or remove one on their own initiative; an administrator clears an authenticator for recovery. Managing your own authenticator in Account settings is available to account administrators only. - The set-password page lists the organization's rules before the person types.
- A dead, expired, or revoked link shows a plain message asking for a new link. A mistyped password at sign-in shows the same message.
- After setting a password, the person sees a Back to the application link. It goes to one of the organization's applications that has a concrete, non-wildcard redirect URI registered. Without one, it goes to the organization's console address, which a non-administrator cannot use. Register at least one concrete redirect URI so that invited and reset users land in your application.
- A person invited with an email address only is asked for their name before finishing. They are not signed in automatically; they sign in afterwards.
Emails your users receive
| Sent when | Subject | |
|---|---|---|
| Password reset | The user chooses "Forgot password?" | Reset your password |
| Account action | An administrator sends a password reset or an invitation, or the user owes an action | Action needed on your account |
| Email verification | Verification is required | Confirm your email address |
- The sender name is the organization's display name, from
[email protected], with replies going to[email protected]. - Every body names the organization, but subjects cannot include it, which is a platform constraint.
- The set-password email includes the full sign-in address for the user's organization and their username, as they will type it.
- Emails carry no remote images.
- Signup verification and account administrator emails are sent by Algebrix Identity and do not name an organization.
AI agents
Agent identities follow the same principle as the rest of the platform: state plainly what is enforced, and where. In summary (sections 07 and 08 have the detail):
- Algebrix enforces what an agent's tokens can carry. Your API, or your customer's, enforces what each call may do.
- Token events show what the agent was allowed to attempt, not what it did.
- Suspension stops new tokens immediately. Tokens already issued stay valid until they expire: at most 15, 30, or 60 minutes by tier. APIs that check the suspended list refuse them within about two minutes.
- Algebrix does not see the downstream API call, the prompt, or the model's reasoning.
- Approval reasons are written by the agent, and shown to approvers labelled that way.
- Every evidence pack states its coverage and chain head. Verify packs with the published key set, never with a key URL taken from the pack.
- Delegated tokens carry no
actclaim. Identify the agent byazpand the agent claims. - Agent private keys belong in a secrets manager or KMS, never in a repository, a prompt, a log, or the agent's memory. A secret, allowed on low tier only, is a bearer value: anything that reads it can impersonate the agent.
15 Scope and behaviour
What the platform does and does not do, stated plainly so that evaluation does not turn up surprises.
Not available in this version
| Capability | Status |
|---|---|
| Machine-to-machine access to the management API | Not available. Call the management API as a signed-in administrator. |
| API management of applications, organizations, billing, and authentication settings | Console only |
| SAML federation to a corporate IdP | On the roadmap |
| SCIM provisioning | Not available. Use the management API or CSV import. |
| Token exchange, RFC 8693 | Supported only for agents acting for users (section 08). Not available to other clients. |
| CIBA, OpenID Connect backchannel authentication | Supported only for agent approvals (section 08). Not available to other clients. |
| Resource indicators, RFC 8707, for agent tokens | Not supported. Do not send resource; audiences come from the mandate. |
| A public API for managing agents (classes, instances, mandates, credentials, approvers, evidence packs) | On the roadmap. Agents are set up and managed in the console. |
An act claim on delegated tokens, or an approval ID claim on approval tokens | Not included. Use azp, the agent claims, and jti. |
| Emergency access for agents | Available once accounts can have more than one administrator |
| Credentials an agent holds for other systems | Outside Algebrix's scope |
| Dynamic client registration, RFC 7591 | Not supported, although the discovery document lists a registration endpoint. Create applications in the console. |
| Passkeys and WebAuthn | Not available. Multi-factor authentication is TOTP only. |
| End-user self-service account page | Not available |
| Token introspection, RFC 7662 | Not available, although the discovery document lists the endpoint. Validate tokens locally against the keys endpoint (section 05). |
| Refresh token rotation | Not enabled |
| Overlapping client secrets during rotation | Not available. Rotation takes effect immediately. |
| Platform SDKs | None. Use the standard OIDC libraries in section 05, or start from a sample application (section 06). |
| Forced password expiry, or forcing a reset after a policy change | Not offered |
| Sign-in activity export | Not available. The audit log exports. |
| Filtering users by multi-factor state | Not available |
| Emailing many users at once | Not available |
| Self-service branding beyond the logo | Colours, backgrounds, and wording are configured by Algebrix on request |
| Webhooks, API keys, directory sync | On the roadmap |
| Enterprise SSO, custom domains | Available with Algebrix assistance |
Operational notes
- HTTPS only. Plaintext HTTP is not served on any endpoint.
- Organizations share nothing. Users, credentials, sessions, roles, signing keys, and audit records belong to exactly one organization.
- User identifiers are stable. The
idfield and thesubclaim are the same value and never change. Usernames and email addresses can change, so do not key on them. - Client IDs are permanent. Display names can change.
- Disable rather than delete where the audit trail must keep resolving an account. User deletion is permanent, and there is no undelete.
- Deleting an application ends its sessions. Deleting an organization destroys its audit trail, so export first.
- Authentication is never gated on billing or on machine token allowances. User sign-in continues in every subscription and quota state.
- Sign-in activity arrives within 30 seconds.
- Agents are not applications. They never appear in the Applications list or count toward the applications allowance.
- Agent tokens have no refresh token. An agent signs a new assertion when its token expires.
- Agent records outlive the agent. Retiring an instance destroys its credential, and keeps its records for the plan's retention period.
- Agent tokens count toward the machine-to-machine token allowance, and never toward monthly active users.
- Agent refusals appear within seconds in the instance's Activity, and new tokens stop within seconds of a suspension.
Standards implemented
OAuth 2.0 (RFC 6749), Bearer Token Usage (RFC 6750), PKCE (RFC 7636), Token Revocation (RFC 7009), JSON Web Token (RFC 7519), JWT client authentication (RFC 7523), OAuth 2.0 Token Exchange (RFC 8693) and OpenID Connect CIBA Core 1.0 for agents, OpenID Connect Core 1.0, and OpenID Connect Discovery 1.0. Evidence packs use JSON Canonicalization (RFC 8785), JWK Thumbprints (RFC 7638), SHA-256, and ES256. The authorization core is Apache-2.0 licensed and standards-conformant. No proprietary protocol extension is required for integration, and there is no lock-in at the protocol layer.
Versioning and support
API paths carry no version segment, and this document is versioned instead. Version 2.3 describes the platform as of November 2026. Changes that would break an existing integration are published as a new major version of this document; minor versions add guidance and clarifications.
Version 2.3 extends AI agent identities (sections 07 and 08) with human approval of sensitive actions, agents acting for users, tamper-evident records and signed evidence packs with offline verification, the customer's view of their agents, key rotation, periodic owner review, and the suspended list for APIs. The plans section gains the agent limits and features for every plan, and agent tokens now count toward the machine-to-machine token allowance. Existing agent integrations keep working; every assertion should now name its key (kid), which is required during a key rotation.
For support, write to [email protected]. For a specific failed call, include the traceId where one is returned.