Agents
Reviewed, versioned automation that takes 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: read the intake pack, extract the fields, fill the form, wait for a human to countersign, file the result. It is a saved, reviewed automation — a list of steps, the saved actions it is allowed to take, and the points where a person has to sign off.
GET /v1/agents lists the agents your organization can run; POST /v1/agent-runs starts one on a set of files. Everything after that is one object — the agent run (agr_…) — that you poll or subscribe to.
An agent in the API is a playbook in the CloudRaker app. Same object, same runs: what you build and review under Playbooks is what GET /v1/agents returns, and a run started over the API shows up there like any other.
An agent
Only active agents are listed. Ids are opaque strings — don’t parse them.
Who does each step
Every step has an executor, and that is the whole division of labour:
agent— it runs by itself. Nothing for you to do.human— it waits. Complete it withPOST /v1/agent-runs/:id/tasks/:taskId/complete, optionally attaching a note and files.
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 anything waiting on it, exactly like a completed one.
Sign-off gates
An action’s approval says where a human has to agree before the agent may proceed:
Every outstanding sign-off appears in approvals[] on the run, with a kind of before or output, the action’s name, the files it touches, and — for a before gate — the proposed params. Answer it with POST /v1/agent-runs/:id/approvals/:approvalId; approving lets you replace those params or files first, and rejecting requires a note.
Run statuses
completed, failed, cancelled, and expired are terminal.
A completed run that still had outstanding work also carries incomplete: true — it closed with steps unfinished, and tasks[] shows which. Treat it as “done, with gaps”, not as a failure.
A paused run keeps everything it produced and can be started again. Whatever an agent run already filed — imported records, attached files, a sealed signature — is never taken back, at any status.
Long-lived by design
An agent run that is blocked on a person waits days, and the API is built for 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, so a human step has to land before then.- Input files are never purged on a deadline. Files you pass as
{ "url": … }join your reusable file corpus, so the run still has its inputs however long it waits. There is nottlonPOST /v1/agent-runs. output.files[]links are short-lived — each signed URL is good for about an hour. Re-read the run for a fresh one.
Agent runs are a separate surface from runs. They don’t appear in GET /v1/runs, they have no list endpoint, and there is no cancel or delete for one — 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.
The five agent_run.* events, so you aren’t polling for days.
The catalog an agent’s steps are built from.
Build and review the same automation from the CloudRaker interface.