Every AgentRail agent key carries an explicit list of scopes. A request fails withDocumentation Index
Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
403 insufficient_scope if the key does not include the scope required by the endpoint being called. Scopes are set at key creation time and can only be changed by rotating the key.
Follow the principle of least privilege: give each agent only the scopes it needs to perform its assigned work. An agent that only reads task status and CI results does not need ship:write or auth:admin.
Scope table
| Operation | Required scope |
|---|---|
| List or read tasks | tasks:read |
| Submit task work | tasks:write |
| Read CI summaries | ci:read |
| Read review feedback | reviews:read |
| Ship or merge work | ship:write |
| Stream task events | events:read |
| List event subscriptions | webhooks:read |
| Create or delete event subscriptions | webhooks:write |
| Sync Linear comments or workflow state | providers:write |
| Create or rotate agent keys | auth:admin |
| Read key usage | usage:read |
All available scopes
Read access to assigned tasks. Required for
GET /tasks/mine and GET /tasks/:id.Write access for task mutations. Required for
POST /tasks/:id/submit.Read access to CI summaries. Required for
GET /tasks/:id/ci-status.Read access to PR review feedback. Required for
GET /tasks/:id/review-feedback.Write access to trigger merge and deploy operations. Required for
POST /tasks/:id/ship.Read access to the SSE event stream. Required for
GET /task-events/stream.Read access to event subscriptions. Required for
GET /event-subscriptions.Write access to create and delete event subscriptions. Required for
POST /event-subscriptions and DELETE /event-subscriptions/:subscriptionId.Write access to sync Linear comments and workflow state through provider adapters.
Full access to create and rotate agent API keys. Required for
POST /agent-api-keys and POST /agent-api-keys/:keyId/rotate. Also satisfies usage:read.Read access to key usage counters. Required for
GET /agent-api-keys/:keyId/usage.Recommended scope sets by agent role
| Agent responsibility | Minimum scopes |
|---|---|
| Read assigned tasks only | tasks:read |
| Submit completed work | tasks:read, tasks:write |
| Inspect CI results | ci:read |
| Inspect review feedback | reviews:read |
| Full task lifecycle (read, submit, observe, ship) | tasks:read, tasks:write, ci:read, reviews:read, ship:write |
| Stream task events | events:read |
| Manage webhook subscriptions | webhooks:read, webhooks:write |
| Bootstrap and key administration | auth:admin, usage:read |
auth:admin key guidelines
Use auth:admin keys only for:
- The initial bootstrap key created before any agent keys exist.
- Operator scripts that rotate or provision agent keys.
- Administration tooling that reports on key usage.
.png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)