Skip to main content
A hold is a question an agent asked a person mid-run: approve these payments, check these extracted fields, give feedback on this draft. The run is held until someone decides it, then the agent is called again with the decision. People decide holds in the panel’s Review queue; this API lets your own tools do the same — a Slack bot, a back-office screen, an automated rule. For how an agent asks, see Human approvals. Reading holds needs any role in the environment. Deciding one needs a role the capability lists as approvers in agentos.yaml ([admin, member] by default), for people and service accounts alike.

List holds

GET /v0/envs/{env}/holds The environment’s holds, newest first. Experiment runs’ holds aren’t listed.
string
pending, resolved, expired or cancelled.
boolean
default:"false"
Only the holds waiting for a decision that you may decide — what your Review queue shows. Without it, every hold of the environment is listed, including ones your role can’t decide.
integer
default:"20"
1–100.
string
A hold_id: only older holds.

Get a hold

GET /v0/envs/{env}/holds/{hold_id} The ask as the agent made it and, once decided, the decision.

The hold object

string
pending (waiting), resolved (decided), expired, or cancelled (its run was cancelled).
string
One sentence: what the agent wants to do.
array
The actions the reviewer may choose for each item: approve, edit, reject, feedback.
array
What is decided, together: each {id, title, data, confidence?}. confidence maps a field of data to how sure the agent is (0–1).
string
Markdown for the reviewer.
array
Files to look at with the ask. Download them with the Files API.
array
The roles that may decide it.
string | null
When it expires on its own; null for never. An expired hold resumes the agent with resolved_by: "expired" and no items.
string | null
human once decided, expired once expired.
object | null
Once decided: {items, comment, reviewer, reviewer_kind, decided_at}. reviewer_kind is person or service_account; items is what was decided per item.

Decide a hold

POST /v0/envs/{env}/holds/{hold_id}/decision Decide every item of the ask, each once, with an action the ask offered. The caller is the reviewer. The run is called again right after with the decision.
array
required
One entry per item of the ask: {id, action, data?, comment?}.
  • action: one the ask offered (approve, edit, reject, feedback).
  • data: only with edit, and it is the item’s full data with the asked item’s keys, not a patch. An edit whose data equals the item as asked is stored as an approve.
  • comment: optional per item; required with feedback.
string
A comment on the whole decision, at most 2,000 characters.
A person who started the run may decide its hold too, if their role is an approver.

Errors

To be told when a hold is waiting instead of polling, subscribe a webhook to run.held; hold.decided tells you when someone decided it.