Agents
Reviewed, versioned automation that runs several steps, asks for sign-off, and hands work back to a person.
The capability verbs do one thing per call. An agent does a sequence of things. Example: read the intake pack, extract the fields, fill the form, wait for a human to countersign, file the result. An agent is a saved, reviewed automation. It holds a list of steps, the saved configs it may use, and the points where a person must sign off.
GET /v1/agents lists the agents your organization can run. POST /v1/agent-runs starts one on a set of files. After that, you work with one object: the agent run (agr_…). Poll it or subscribe to it.
An agent in the API is a playbook in the CloudRaker app. They are the same object with the same runs. What you build and review under Playbooks is what GET /v1/agents returns. A run started over the API also shows up there.
An agent
The API lists only active agents. Ids are opaque strings. Do not parse them.
Who does each step
Every step has an executor. That field sets the full division of labour:
agent— the step runs by itself. You do nothing.human— the step waits. Complete it withPOST /v1/agent-runs/:id/tasks/:taskId/complete. Attach a note and files if you need to.
On a run, each step also carries a status: pending (blocked on its dependsOn), ready (open), in_progress, completed, or skipped. A skipped step satisfies dependencies the same way a completed step does.
Sign-off gates
An action’s approval says where a human must agree before the agent proceeds:
Every outstanding sign-off appears in approvals[] on the run. Each entry carries a kind of before or output, the action’s name, and the files it touches. A before gate also carries the proposed params. Answer it with POST /v1/agent-runs/:id/approvals/:approvalId. When you approve, you can replace those params or files first. When you reject, you must include a note.
Run statuses
completed, failed, cancelled, and expired are terminal.
A completed run that had outstanding work also carries incomplete: true. The run closed with unfinished steps, and tasks[] shows which. Treat this as done with gaps, not as a failure.
A paused run keeps everything it produced, and you can start it again. The API never takes back work an agent run already filed: imported records, attached files, or a sealed signature. This holds at every status.
Long-lived by design
An agent run that is blocked on a person can wait days. The API supports that:
expiresAtis about seven days out. That is the run’s deadline, not a cleanup timer. An unfinished run parks itself for good when it passes the deadline. A human step must land before then.- The API never purges input files on a deadline. Files you pass as
{ "url": … }join your reusable file corpus. The run keeps its inputs however long it waits.POST /v1/agent-runshas nottl. output.files[]links are short-lived. Each signed URL is valid for about an hour. Re-read the run to get a fresh one.
Agent runs are a separate surface from runs. They do not appear in GET /v1/runs. They have no list endpoint, and no cancel or delete. Keep the agr_ id you got at create, or find the run again with your own metadata.
Next steps
Start a run, poll it, answer an approval, and complete a human step, with curl examples.
The five agent_run.* events. Subscribe to them instead of polling for days.
The catalog that supplies an agent’s steps.
Build and review the same automation from the CloudRaker interface.