Skip to main content
Require a person to sign off on a task’s output before the next task can read it.
The TypeScript counterpart lives at Human-in-the-Loop Review (TypeScript).

Quick Start

1

Require sign-off with human_input=True

Set human_input=True on the task; the reviewer is asked before the next task runs.
2

Ask your own question with human_review_prompt

Set human_review_prompt to control exactly what the reviewer is asked.
Review reuses the existing approval backends, so it works wherever Approval already does — console, callback, bot, or UI — with no separate wiring.

How It Works

The task runs, the automatic guardrail passes, then the approval backend asks a person to sign off before the next task reads the output.

Behaviour Contract

Every rule below comes straight from _apply_human_review / _aapply_human_review.

Approval vs. Human Review vs. Guardrails

Three features gate agent work at different points — pick by what you are protecting.
The approval manager gates a TOOL CALL and guardrails validate automatically; neither let an orchestrator require a person to approve an output before the next task consumes it.

Task Options

Two Task fields turn on review.

Best Practices

A rejection writes the reviewer’s reason into task.validation_feedback, and the outer retry loop folds it into the re-run’s prompt — the next draft addresses the objection without any code from you.
human_input=True with praisonaiagents.approval unavailable raises rather than skipping. For headless or CI runs, register a console, callback, bot, or UI backend so the review can actually reach a person.
Add a guardrail for the checks a machine can make, and reserve human review for judgement calls. Review only runs on output the guardrail already accepted, so a person is never asked about something already rejected.
Repeated rejection stops at task.max_retries with an exception naming the last reason. Set it deliberately so a reviewer who keeps rejecting halts the workflow instead of looping.

Alternative: team-level review hooks

MultiAgentHooksConfig(on_task_complete=…) is a lightweight hook that runs on every task in a sequential team and can edit outputs in place.
The two mechanisms are complementary. Task(human_input=True) reuses approval backends and integrates with the retry loop, so it can hard-stop and re-run a task. The MultiAgentHooksConfig gate runs on every task and can mutate outputs, but cannot hard-stop the workflow on its own — a bare raise inside it is logged and swallowed.
1

Team-level review gate (soft: approve / edit)

The team-level hook receives (task, task_output) and fires for every task — filter by task.name. Rejection is logged, not raised.
2

Per-task strict gate (hard-stop on reject)

The per-task 1-argument callback halts the run when combined with fail_on_callback_error=True.

⚠️ Two different on_task_complete hooks — DIFFERENT signatures

The team-level and per-task hooks look identical but bind different objects.
A bare raise inside a MultiAgentHooksConfig hook does not stop the workflow today — the team-level path logs and swallows it. To hard-stop on reject, use Task(human_input=True) or a per-task Task(on_task_complete=…, fail_on_callback_error=True) instead.
start() forwards **kwargs but never consumes an inputs= argument. Pass template values via AgentTeam(variables={...}) with {{key}} placeholders in task/agent fields. Note the double brace {{topic}} — not the single-brace {topic} used by the roles-file YAML loader.
Mutating task_output.raw inside the hook is picked up by downstream tasks that read that task via context=[t1], so edits flow forward automatically.
The team-level hook fires for every task in the team. Use task.name in REVIEW_TASKS to opt individual tasks into review rather than relying on position.

Approval

The approval system this feature reuses

Approval Backends

Plug in console / callback / bot / UI

Guardrails

Automatic output validation (runs first)

Human Review (TypeScript)

The TypeScript parity page

Multi-Agent Hooks

Lifecycle callbacks for multi-agent workflows

Task Context Control

Control which task outputs feed the next task