Reference
API overview
Authentication, resources and conventions of the REST API.
The REST API manages agents, starts runs and reads their results. The console is built on the same API.
Base URL
https://api.example.com/v1Requests and responses are JSON over HTTPS. Timestamps are ISO 8601 in UTC.
Authentication
Send an API key as a bearer token. Keys are created in the console under Settings. Each key belongs to one environment and carries scopes that limit what it can do.
| Scope | Allows |
|---|---|
agents:deploy | Create agents and deploy versions. |
runs:create | Start runs. |
runs:read | Read runs, steps and outputs. |
policies:write | Create and change policies. |
audit:read | Read and export audit events. |
usage:read | Read usage and billing data. |
Start a run
curl https://api.example.com/v1/agents/support-triage/runs \ -H "Authorization: Bearer $AGENTOS_API_KEY" \ -H "Content-Type: application/json" \ --data '{"input": {"ticket_id": 48213}}'The request returns as soon as the run is accepted. The run continues in the background.
HTTP/1.1 202 AcceptedContent-Type: application/json { "id": "run_4w21jb4rrgak", "agent": "support-triage", "version": 42, "status": "running", "created_at": "2026-11-24T07:02:55.200Z"}Read a run
Fetch a run to see its status, steps and output. A run that is waiting for an approval reports who it is waiting for.
{ "id": "run_vtqzd1rm1qw5", "agent": "access-concierge", "version": 22, "status": "awaiting_approval", "created_at": "2026-11-24T06:59:00.000Z", "steps": [ { "kind": "trigger", "name": "event", "status": "completed" }, { "kind": "model", "name": "balanced", "status": "completed" }, { "kind": "tool", "name": "identity-provider.get_user", "status": "completed" }, { "kind": "approval", "name": "manager_of:j.alvarez", "status": "waiting" } ], "waiting_for": { "approvers": ["manager_of:j.alvarez"], "policy": "access-grants" }, "output": null}Resources
| Path | Resource |
|---|---|
/agents | Agent definitions and their versions. |
/agents/{name}/runs | Start a run of an agent. |
/runs/{id} | A run with its steps, status and output. |
/approvals | Pending approvals. Approve or reject them. |
/policies | Policies, their tests and their decisions. |
/integrations | Connected MCP servers and tool permissions. |
/memory/{scope} | Entries in a memory scope. |
/audit/events | Audit events. |
/sandboxes | Sandbox templates and sessions. |
Idempotency
Send an Idempotency-Key header with requests that create something. A repeated request with the same key returns the original result instead of starting a second run.
Pagination
List endpoints return a page of results and a next_cursor. Pass it as the cursor parameter to get the next page. When next_cursor is null, there are no more results.
Errors
Errors use standard HTTP status codes and a JSON body with a stable code.
HTTP/1.1 403 ForbiddenContent-Type: application/json { "error": { "code": "policy_denied", "message": "Tool is not granted to this agent.", "policy": "least-privilege", "request_id": "req_8f2k4m9x1q7d" }}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request could not be parsed. |
| 401 | unauthenticated | The API key is missing or not valid. |
| 403 | forbidden | The key lacks the scope for this request. |
| 403 | policy_denied | A policy denied the action. |
| 404 | not_found | The resource does not exist in this environment. |
| 409 | conflict | The resource changed since it was read. |
| 422 | validation_failed | A field is missing or not valid. |
| 429 | rate_limited | Too many requests. Retry after the time in Retry-After. |
Webhooks
Subscribe to events such as run.completed, run.failed and approval.requested to react without polling. Each delivery is signed, so you can verify that it came from your workspace.