> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequentum.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent registration (auth.md)

> Let an AI agent or script get a scoped token for your Sequentum account, approved by you with a one-time code.

Sequentum supports [auth.md](https://workos.com/auth-md), an open protocol that lets an AI agent register with a service on your behalf. Your agent asks for access with your email address, you approve it on a Sequentum page by typing a 6-digit code, and the agent gets a bearer token limited to the scopes you approved.

Use it for agents and scripts that run without a browser: Claude Code, custom MCP clients, pipelines. For a plain server-to-server integration that you own, an [API key](https://docs.sequentum.com/api-reference/authentication.md#api-key-recommended) is still simpler.

## Point your agent at the manifest

Every Sequentum deployment publishes a manifest, a short Markdown document written for agents, that walks through each request:

* `https://dashboard.sequentum.com/auth.md`, for the Control Center API.
* `https://mcp.sequentum.com/auth.md`, for agents that only know the MCP server. It redirects to the same manifest.

The manifest is the source of truth for requests, fields and error codes, and an agent that reads it can complete the flow on its own. In most cases you only need to tell your agent: "Register with Sequentum using `https://dashboard.sequentum.com/auth.md`."

Agents can also find it without being told. A request to the API without a valid token returns `401` with a `WWW-Authenticate` header whose `resource_metadata` points at the protected resource metadata, which leads to the manifest.

## How it works

**1. Your agent asks to register**

It tells you it's registering with Sequentum and which permissions it wants, and asks you to confirm. It then registers with your email address. See the manifest's "Step 3 — Register".

**2. It shows you a link and a code**

The agent gives you a link to a Sequentum page and a 6-digit code.

**3. You approve it on Sequentum**

Check that the link opens on `dashboard.sequentum.com` before you sign in: your agent passes the link on, so don't trust one that points anywhere else. Sign in (or create an account with the same email address), check the agent's name and permissions, type the code, and choose **Approve** or **Decline**. Only approve an agent you just asked to connect. Meanwhile the agent waits for your answer. See the manifest's "Step 4 — Claim ceremony".

**4. The agent gets its token**

Once you approve, the agent receives an access token and an identity assertion. It calls the API with the access token in the `Authorization: Bearer` header.

**5. It renews the token on its own**

When the access token expires, the agent exchanges its identity assertion for a new one. There is no refresh token. See the manifest's "Step 5 — Exchange the assertion".

## What you see on the approval page

The page is titled **Connect an agent**. It shows:

* **The agent's name**, as `Calls itself "<name>"`, with the platform it runs on when the agent gives one. The agent chooses this name and Sequentum has not verified it, so only approve an agent you just asked to connect.
* **The account you're signed in as.**
* **The permissions**, under "This will allow the agent to:".
* **A box for the code.**

> [!WARNING]
>
> Type the code into Sequentum's page, never into your agent's chat. The code travels from your agent to you, not the other way. Sequentum never emails you a code.

Other screens you may see:

| Screen | What to do |
| - | - |
| That code is not right. | Check the code your agent showed you and try again. |
| Too many wrong codes. | Ask your agent for a new code. It gives you a new link. If it can't, ask it to start again. |
| This code has expired. | Ask your agent for a new code. It gives you a new link. |
| This link is no longer valid. | Use the newest link your agent gave you. If it has none, ask it to start again. |
| This agent is already connected. | Nothing. The agent already has access. |
| This request is for `<email>`. | The agent registered with another email address. Choose **Sign out and continue** and sign in as that user. |

## Scopes

A token carries only the scopes you approved. When the agent doesn't ask for specific scopes, it asks for all of them, including the write scopes. Ask your agent to request only the scopes it needs, and decline a request that asks for more.

| Scope | Lets the agent |
| - | - |
| `agents:read` | View your agents and their configurations |
| `agents:write` | Start, stop, and manage your agents |
| `runs:read` | View run history and results |
| `spaces:read` | View your spaces |
| `spaces:write` | Run agents in your spaces and upload space-scoped input files |
| `billing:read` | View your credits, spending, and usage history |
| `datasets:read` | View your dataset schemas and upload status |
| `datasets:write` | Upload data and manage dataset uploads |

A `403` with `WWW-Authenticate: Bearer error="insufficient_scope"` means the token doesn't carry the scope that endpoint needs. Retrying with the same token doesn't help: the agent has to register again and ask for every scope it needs, including the ones it already has. Once the new registration works, revoke the old one (see [Manage and revoke connected agents](#manage-and-revoke-connected-agents)).

## Lifetimes

| What | Lifetime |
| - | - |
| Code shown to you | 10 minutes. The agent can ask for a fresh code. |
| Registration waiting for your approval | 24 hours. After that the agent has to start over. |
| Access token | 1 hour. |
| Identity assertion | Up to 90 days from your approval. It stops working after 30 days unused. |

Each exchange returns a new identity assertion and retires the one the agent sent. A retired assertion is still accepted for 30 seconds, so two overlapping requests both succeed. After that, presenting a retired assertion ends the registration, and you have to approve the agent again.

The identity assertion is a credential that can stay valid for up to 90 days. Store it as a secret and keep it out of logs and out of the agent's chat. Unlike an API key it changes on every exchange, so replace the stored copy with the new assertion each time: a pipeline that keeps the first one in a read-only secret ends its own registration on its second run.

> [!NOTE]
>
> If several workers share one registration, they must share the newest identity assertion, or each worker registers on its own (and you approve each one). When one worker exchanges, the copy the others hold is retired; the next worker to present it more than 30 seconds later ends the registration, and you have to approve the agent again.

## Rate limits

| Request | Limit |
| - | - |
| Register | 5 per hour per IP address |
| Ask for a fresh code | 10 per hour per IP address |
| Waiting for approval (polling) | 20 per minute per registration, and 300 per minute per IP address |
| Exchanging the identity assertion | 300 per minute per IP address, and 600 per minute per organization |
| Revoke | 60 per minute per IP address |

Polling and exchanging share one budget of 300 requests per minute per IP address, and approving or declining on the approval page counts toward the organization's 600 per minute.

A `429` response carries a `Retry-After` header. Wait that many seconds before trying again. If another request exchanged the same identity assertion meanwhile, retry with the newest assertion: the wait is longer than the 30-second grace, so resending the retired one ends the registration.

## Use with the MCP server

An agent that follows the manifest gets a token that works on both the API and the MCP server at `https://mcp.sequentum.com/mcp`: the manifest tells it to leave `resource` out when it exchanges its identity assertion (Step 5).

If an agent sends `resource`, it must be `https://mcp.sequentum.com` for the MCP server to accept the token. The MCP server refuses a token issued for Control Center (`resource=https://dashboard.sequentum.com`), whether the agent asked for it when it first collected its token or when it renewed one. See [Connect](https://docs.sequentum.com/mcp/connect.md#for-agents-and-scripts-without-a-browser) for MCP client setup.

## Manage and revoke connected agents

In Control Center, choose **Account** under **Your Account** in the left menu, then **Connected Apps**. The **Connected agents** list shows each agent you approved, with its scopes, when you approved it, and when it was last used.

Choose **Revoke** to cut an agent off. Its next API call returns `401` (through the MCP server, its next tool call fails with an invalid-token error instead), its next exchange is refused, and it can only reconnect if it registers again and you approve it.

Anything that ends your other sessions or changes how you sign in also disconnects every connected agent. For example: changing your password or email address, turning two-factor authentication on or off, switching to Google or Microsoft sign-in, choosing **Sign out other sessions**, an admin moving, disabling or signing you out, or, for a single sign-on account, your organization starting to require two-factor authentication confirmed by your sign-in provider. Each agent has to register again with your current email address, and you approve it again.

When your organization starts requiring two-factor authentication, an agent you approved from a session that did not complete two-factor sign-in stops working and disappears from the list. Its next API call returns `401` with `error="invalid_token"` saying multi-factor authentication is required (through the MCP server, its next tool call fails instead), and its next exchange is refused. Let it register again, and approve it after you complete two-factor sign-in. An agent keeps working if your account uses single sign-on (Google, Microsoft or Okta) instead of a password and you approved it from that sign-in; a password account that signs in through single sign-on gets no such exception. If your organization also requires your sign-in provider to confirm two-factor sign-in, the list above applies instead.

An agent can also end its own registration. See the manifest's "Revocation" section.

## Endpoints

These endpoints are outside the `/api/v1` API, so they don't appear in this API reference. The manifest describes each request.

| Endpoint | Purpose |
| - | - |
| `GET /auth.md` | The manifest |
| `GET /.well-known/oauth-protected-resource` | Protected resource metadata |
| `GET /.well-known/oauth-authorization-server` | Authorization server metadata, including the `agent_auth` block |
| `POST /api/agent/identity` | Register |
| `POST /api/agent/identity/claim` | Ask for a fresh code |
| `POST /api/oauth/token` | Wait for approval, and exchange the identity assertion |
| `POST /api/oauth/revoke` | Revoke a registration |

The token endpoint accepts two grant types for this flow: `urn:workos:agent-auth:grant-type:claim` while waiting for approval, and `urn:ietf:params:oauth:grant-type:jwt-bearer` to exchange the identity assertion.

## What Sequentum supports

Sequentum accepts the `service_auth` registration method: the agent needs your email address, and your approval is always required. The `anonymous` and `identity_assertion` methods from the auth.md protocol are not accepted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.