Returns the agent-in-the-loop review row tracking a managed-agent session for the given HIL block. 404 when no agent review has been spawned (block has agent_in_the_loop=‘disabled’ or the workflow hasn’t reached the block yet).
Return the managed-agent review state for a single human-in-the-loop block in a workflow run. An agent review is spawned when the block’sDocumentation Index
Fetch the complete documentation index at: https://docs.retab.com/llms.txt
Use this file to discover all available pages before exploring further.
agent_in_the_loop config is pre_review, review, or auto. The agent inspects the document, grounds each flagged field, and produces a structured proposal (approve / approve‑with‑modified_data / reject / escalate). This endpoint exposes that proposal and its current dispatch state.
Returns 404 when no agent review has been spawned for the (run_id, block_id) pair — either because the block has agent_in_the_loop="disabled", or because the workflow hasn’t reached the block yet.
| Field | Notes |
|---|---|
mode | "pre_review" / "review" / "auto" — how the agent’s proposal is dispatched. |
status | Lifecycle: queued → running → terminal (proposed, submitted, escalated, failed, superseded_by_human). |
proposed_decision.approved | true / false / null (when escalating). |
proposed_decision.modified_data | The replacement payload the agent suggests (only when it proposed corrections). |
proposed_decision.confidence | Float 0–1. Auto-mode auto-submits only when ≥ auto_threshold. |
proposed_decision.evidence | One item per verified field, each with a literal quote from the document, a source pointer (page / char_range), and the action taken (approved_unchanged / modified / rejected). |
proposed_decision.changed_paths | Sub-paths of extracted_data the agent modified. |
proposed_decision.escalate | true when the agent could not confidently decide. escalation_reason carries the explanation. |
submitted_hil_command_id | Populated when status="submitted" — deterministic id of the HIL decision the workflow applied. |
failure_reason | Populated when status="failed" (timeout, schema-validation failure, session error). |
auto_threshold, timeout_seconds | The config values at spawn time. |
mode | Agent confidently approves | Agent approves with corrections | Agent escalates |
|---|---|---|---|
pre_review | status=proposed, parked for human | proposed with modified_data | proposed |
review | status=submitted, workflow resumes | submitted with the corrected payload | proposed, parked |
auto | submitted if confidence ≥ auto_threshold, else escalated | Same gate | escalated |
proposed and escalated, the dashboard’s review panel offers Accept & continue (one-click submit) and Apply to form (pre-fill the human review form with modified_data) when the proposal is actionable.
Successful Response
Sidecar persistence row tracking a managed-agent review attempt for one HIL block.
Identity is (tenant scope, run_id, block_id) and is enforced by a unique
Mongo index — that is the load-bearing primitive that keeps managed-agent
spawning idempotent across Temporal activity retries and double-trigger races.
Internal id (nanoid).
Workflow run id the block belongs to.
HIL block id being reviewed.
Workflow id the run belongs to (denormalized for query convenience).
Configured agent_in_the_loop mode at spawn time.
pre_review, review, auto Snapshot of agent_auto_confidence_threshold at spawn time. Frozen so config edits during the run don't change the gate.
0 <= x <= 1Snapshot of agent_review_timeout_seconds at spawn time.
30 <= x <= 3600Lifecycle status of this review attempt.
queued, running, proposed, submitted, escalated, failed, superseded_by_human Anthropic Managed Agents session id once spawned.
Anthropic vault id minted at spawn time for this session. Holds the per-org master_key impersonation token. Archived alongside the session at end-of-life.
Last proposal received from the agent. Updated on each custom-tool callback.
HIL command id used when the proposal was submitted via submit_hil_decision_service.
Free-text reason when status='failed'. Populated by timeout, schema rejection, or session error.