Skip to main content
When a dagraph run reaches an approval_gate or user_input node, it pauses and waits for a human decision. The approve and respond commands let you record that decision from the terminal. After either command, re-run the DAG with --run-id to resume execution from where it stopped.

agentgraph approve

Use approve to record a human decision on a paused approval_gate node — either approving it so the run continues, or rejecting it to mark the run as failed.
agentgraph approve <run_id> <node_id> [OPTIONS]

Arguments and flags

run_id
string
required
The run ID that contains the pending approval gate. Find it with agentgraph list --status paused.
node_id
string
required
The ID of the approval_gate node to act on. The node must be in awaiting_approval status.
--runs-dir
string
default:"runs"
Runs directory. Must match the --runs-dir used when the DAG was originally run.
--reject
boolean
Reject the gate instead of approving it. The node is marked failed and the run does not continue past this point.
--comment
string
Optional reviewer comment stored alongside the decision. Visible in the artifact and in audit logs.
--approver
string
Override the approver identity written to the artifact. Defaults to the value of the $USER environment variable.

Examples

agentgraph approve a1b2c3d4e5f6 review_gate

Approve/reject flow

1

Run the DAG

agentgraph run examples/approval_flow.yaml --input feature="dark mode"
The run pauses at the approval_gate node and prints a summary showing which gates are waiting.
2

Find the paused run

agentgraph list --status paused
3

Record your decision

# Approve
agentgraph approve a1b2c3d4e5f6 review_gate --comment "Approved"

# Or reject
agentgraph approve a1b2c3d4e5f6 review_gate --reject --comment "Try again"
4

Resume the run

agentgraph run examples/approval_flow.yaml --run-id a1b2c3d4e5f6
Nodes that already completed are skipped. Execution continues from after the gate (if approved) or stops (if rejected).
Both approve and respond only update the local run state. They do not trigger execution — you must run the DAG again with --run-id to continue.