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
TwoTask fields turn on review.
Best Practices
The rejection reason is fed back automatically
The rejection reason is fed back automatically
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.Register a non-TTY approval backend for headless runs
Register a non-TTY approval backend for headless runs
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.Pair with guardrails — guardrail first, human review second
Pair with guardrails — guardrail first, human review second
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.
Set max_retries to bound repeated rejections
Set max_retries to bound repeated rejections
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.
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.
The team-level hook swallows exceptions
The team-level hook swallows exceptions
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.AgentTeam.start(inputs=…) is silently ignored
AgentTeam.start(inputs=…) is silently ignored
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.Editing propagates through context=[t1]
Editing propagates through context=[t1]
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.Filter by task.name, not index
Filter by task.name, not index
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.Related
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

