endpoint
GET

/api/agents/tasks/{id}/events

Step-by-step events and status

auth: API keybase https://app.nz
Request
curl -s "https://app.nz/api/agents/tasks/{id}/events" \
  -H "Authorization: Bearer pk_live_..."

Agents API

Run cloud coding agents against a repo and a prompt, then poll status, stream step events, inspect changed files, and cancel or retry. GET /api/agents/config returns the option lists (engines, models, reasoning efforts, machine types, providers, skills) and needs no auth so a UI can render the form before sign-in.

POST /api/agents/tasks body
prompt*stringWhat the agent should do (max 20k chars).
sourcestringProvider that runs it: openpaths (default, our cloud) | devin | cursor | codex-cloud. See the Agents SDK section.
repostringTarget repo as owner/name.
branchstringWorking branch to create or use.
baseBranchstringBranch to base the work on.
modelstringModel route, e.g. app/auto-code.
enginestringAgent engine (see /config).
reasoningEffortstringnone | low | medium | high | xhigh | auto.
machineTypestringWorker capability tier (see /config), e.g. auto, cpx32, gpu-a100, or win-cpx32 for a Windows worker.
providerstringExecution tier, e.g. shared (auto fleet), cloud CPU, or cloud GPU (see /config).
skillsstring[]Enabled skills, e.g. ["github","visualbench"].
autoMergePrbooleanAuto-merge the PR when checks pass.
autoNextStepsbooleanLet the agent queue follow-up steps.
spendCapUsdnumberHard spend ceiling for the task.
timeoutSecondsnumberWall-clock timeout.
projectIdstringProject to bill and scope to; defaults to your default project.
titlestringDisplay title; derived from the prompt if omitted.
Launch an agent
curl -sX POST https://app.nz/api/agents/tasks \
  -H "Authorization: Bearer pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "add usage analytics to the dashboard",
    "repo": "acme/ai-dashboard",
    "model": "app/auto-code",
    "reasoningEffort": "high",
    "machineType": "auto",
    "provider": "shared",
    "skills": ["github", "visualbench"],
    "spendCapUsd": 2.00,
    "autoMergePr": false
  }'