Quick Start
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.How It Works
⚠️ Two different on_task_complete hooks — DIFFERENT signatures
This is the whole point of the page: the team-level and per-task hooks look identical but bind different objects.
MultiAgentHooksConfig is imported from praisonaiagents.config.feature_configs (it is not yet re-exported at the top level).Best Practices
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 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
Multi-Agent Hooks
Lifecycle callbacks for multi-agent workflows
Callbacks
Agent callback system
Task Context Control
Control which task outputs feed the next task
Sequential Team (YAML)
The YAML starting point for sequential teams

