TaskApproval
TaskApproval extends Orloj approvals from "may this tool call happen?" to "is this output safe and acceptable to continue?"
Use it when you want a human to review:
- a sensitive agent handoff before downstream agents continue
- a regulated draft before publication or external delivery
- a final task result before the task is marked
Succeeded
How It Works
- An
AgentSystemcheckpoint is configured on a node (spec.graph.<node>.review) or on final completion (spec.completion_review). - The agent runs normally.
- Orloj pauses the task in
WaitingApproval, stores the exact blocker inTask.status.blocked_on, and creates aTaskApproval. - A reviewer chooses:
approve: resume the workflowdeny: fail the taskrequest_changes: rerun the same producing agent with reviewer feedback injected asreview.*runtime input
- If a rerun hits the same checkpoint again, Orloj creates a new
TaskApprovalwith an incrementedreview_cycleand asupersedeslink to the prior review.
request_changes is optional per checkpoint. If allow_request_changes is set to false, reviewers can only approve or deny. When max_review_cycles is reached, Orloj rejects further request_changes decisions with 409 Conflict.
Checkpoint Configuration
apiVersion: orloj.dev/v1
kind: AgentSystem
metadata:
name: regulated-writer
spec:
agents:
- writer-agent
- compliance-agent
graph:
writer-agent:
review:
checkpoint_id: writer-review
display_name: Writer Review
reason: Human reviewer must approve the draft before compliance continues.
ttl: 30m
allow_request_changes: true
max_review_cycles: 3
next: compliance-agent
completion_review:
checkpoint_id: publish-review
reason: Final human signoff is required before the task is marked succeeded.Review Context
For request_changes, Orloj injects:
review.feedbackreview.previous_outputreview.checkpoint_idreview.cyclereview.requested_by
That lets the same agent revise its output with concrete human guidance instead of starting from scratch.
Reviewers send that feedback through POST /v1/task-approvals/{name}/request-changes or orlojctl request-changes task-approval <name> .... The request must include comment or the legacy reason field.
When To Use It
- Healthcare: review a triage note or patient-facing summary before delivery.
- Finance: review a risk classification or client communication before release.
- Insurance: review a claim denial rationale or settlement summary before sending.
See also: