Skip to content

API Overview

The platform API is the durable programmatic boundary for Agirunner.

If you are integrating another system, building custom operator tooling, or driving workflows without the dashboard, this is the surface that matters. The runtime executes work, but the platform API owns the control-plane records and contracts around that work.

Most public routes live under:

/api/v1/...

Local development defaults:

  • dashboard: http://localhost:3000
  • platform API: http://localhost:8080

Most routes require an API key-derived bearer token or the cookie-backed browser session used by the dashboard.

Header form:

Authorization: Bearer <token>

The token exchange and session routes are documented in Authentication.

{
"data": {
"id": "uuid",
"name": "Example"
}
}
{
"data": [
{
"id": "uuid"
}
],
"meta": {
"total": 42,
"page": 1,
"per_page": 20,
"pages": 3
}
}
{
"error": {
"code": "SCHEMA_VALIDATION_FAILED",
"message": "Invalid request body: name is required",
"recovery_hint": "optional, only when the domain error provides one",
"details": {
"issues": {
"fieldErrors": {
"name": [
"Required"
]
},
"formErrors": []
}
}
},
"meta": {
"request_id": "fastify-request-id",
"timestamp": "2026-03-31T18:55:00.000Z"
}
}

Some claim and polling routes intentionally return 204 No Content instead of an empty data object. That means the request succeeded, but there was nothing to claim or no state change to return.

These names appear across most route families.

Field TermMeaning
request_idCaller-supplied idempotency and replay key for mutating writes. Reuse it only when retrying the exact same intended write.
workspace_idDurable project or repository context the run operates against.
workflow_idTop-level run record that owns work items, tasks, events, logs, and artifacts.
work_item_idMid-level unit of work inside a workflow, often mapped to a stage or branch of work.
task_idExecutable unit claimed by an agent or worker.
activation_idOne dispatch cycle or wake-up of workflow orchestration logic.
stateCurrent operational state of the resource itself, such as pending, in_progress, or completed.
lifecycleHigher-level workflow lifecycle classification rather than task execution state.
inputStructured instructions or payload that the task is expected to work on.
contextBroader surrounding packet the runtime may need while executing, such as workflow, workspace, and attached documents.
metadataExtra caller or system annotations that do not usually change control-plane semantics on their own.
created_at / updated_atServer timestamps for creation and last mutation.

The field tables in this API section use a compact contract vocabulary. If a field is documented as arbitrary JSON object, arbitrary JSON value, or opaque, treat it as flexible caller or platform data. If it is documented as a scalar, enum, UUID, or structured object, treat that shape as part of the contract.

LabelMeaning
stringFree-form string. Unless the docs say otherwise, it is not a closed enum.
integerWhole-number scalar.
booleantrue or false.
numeric scalarNumber field such as a timeout, count, or cost cap.
enumClosed set of allowed values. The route schema or page lists the accepted values.
enum-like stringString field with a known current set of values, but not documented here as a permanently closed public enum.
fixed stringLiteral string constant. The field is expected to always contain the documented value.
UUIDCanonical platform identifier.
URL stringURL-shaped string.
base64 stringBase64-encoded content payload.
string mapJSON object whose keys are strings and whose values are expected to be strings.
structured objectObject with documented subfields the platform interprets.
authored structured objectUser-authored object with real product meaning, such as a playbook definition. It is not an arbitrary blob, even if the route accepts flexible JSON.
arbitrary JSON objectCaller-defined JSON object. The platform may store, sanitize, or display it, but only specifically documented keys have platform meaning.
arbitrary JSON valueAny JSON value, including scalar, array, or object.
opaqueStore it and send it back when asked, but do not parse business meaning from it.
server-generatedRead-only field produced by the platform. Clients should not try to author or control it.

Several field tables combine the core labels above with a few common modifiers:

PatternMeaning
<type>[]Array of the given type.
<type> or nullThe field may be absent as null even though its non-null value has a stricter type.
server-generated <type>The platform owns the value and also guarantees the listed non-null type when it is present.
<type A> / <type B>The field currently accepts or returns one of two primitive shapes, depending on route context.
<resource> record[]Array of nested read-model records for that resource family, such as task record[] or activation record[]. The containing page documents the important subfields.

The most common pagination contract in the API is:

  • page: defaults to 1
  • per_page: defaults to 20
  • per_page max: 100

Several stream routes also use cursor-style fields such as after, after_cursor, or cursor.

  1. exchange an API key for a bearer token
  2. look up a playbook and workspace
  3. POST /api/v1/workflows
  4. observe the run through workflow, work-item, and log routes
  1. register an agent or worker
  2. heartbeat regularly
  3. claim work through task or worker routes
  4. report completion, failure, logs, and lifecycle updates
  1. use A2A routes for task ingress and status
  2. use ACP routes for session-oriented agent execution
  3. use remote MCP routes for external tool surfaces

Remote MCP server management is already part of the main platform surface.

A2A and ACP are implemented in the platform today, but they should still be treated as early integration surfaces. The routes and core service logic exist, but they are still in active development and are not yet documented here as fully production-hardened protocol implementations. The Integrations page calls that out explicitly.

The route handlers enforce scope deliberately. Common scopes visible in the code are:

  • admin
  • agent
  • worker
  • service

That means the same API key should not be reused blindly across the dashboard, runtime, workers, and external automation. Route access is part of the platform contract.