AgentRuntime API
Download OpenAPI DocumentyamlOverview
The AgentRuntime API lets you register, execute, monitor, and manage AI agent workflows programmatically. Workflows are defined as directed acyclic graphs (DAGs) whose steps can call MCP tool servers, invoke LLMs, pause for human review, or run sandboxed Lua transforms.
Authentication
All endpoints require a Bearer token passed in the Authorization header:
Authorization: Bearer <your-api-key>
Obtain your API key from the AgentRuntime dashboard or waitlist onboarding email.
Base URL
https://api.agentruntime.io
Request / Response format
All request and response bodies are application/json. Dates are ISO 8601 strings.
Async execution model
Workflow execution is asynchronous. POST /workflows/{id}/command with "start" returns
the initial run state immediately — the workflow continues running in the background. Use the
WebSocket stream (GET /workflows/{id}/stream) or poll GET /workflows/{id}/runs to track
progress.
Step types
| Type | What it does |
|---|---|
mcp_call |
Calls a tool on a remote MCP server |
llm_call |
Sends a prompt to an LLM and captures the response |
human_task |
Pauses the workflow until a human submits a decision |
lua_script |
Runs a sandboxed Lua script inline — no external round-trip |
Template variables
Step arguments can reference upstream results and the workflow's input payload:
{{steps.<step-id>.result.<field>}} — result of a completed upstream step
{{input.<field>}} — value from the workflow start payload
Parallel execution emerges automatically: steps whose depends_on are all satisfied run
concurrently without any extra configuration.
Error handling
All errors return a JSON body with error (human-readable) and optional code (machine-readable).
HTTP status codes follow REST conventions: 400 Bad Request, 401 Unauthorized, 404 Not Found,
409 Conflict, 422 Unprocessable Entity, 500 Internal Server Error.
Rate limits
Rate limits are applied per API key. The X-RateLimit-Remaining and X-RateLimit-Reset
headers are included in every response.
Server
API key obtained from the AgentRuntime dashboard. Pass as Authorization: Bearer <key> on every request.
Stored only in this page session. It is not saved to local storage.
Runs from your browser. Non-GET requests require explicit confirmation and tokens are sent only when you click Send.
Enter a bearer token to enable testing.
curl -sS -X GET \ 'https://api.agentruntime.io' \ -H 'Authorization: Bearer <token>'