output_variable names a task’s result so later tasks can read it.
Available under
PraisonAIAgents / AgentTeam as of PraisonAI PR #4907. Earlier releases only exposed output_variable inside the standalone Workflow engine and its YAML syntax. PraisonAI #4932 fixed the parallel-branch case, where an output_variable set inside parallel([...]) was previously discarded.Quick Start
1
Store one task's output
Name the result with
output_variable.2
Read it in the next task
Reference the stored value with
{{research_data}} in a later task’s action.How It Works
After any task completes — agent or handler — its raw output is stored under the given name in the team’s shared variables.Reading Variables
Substitute a stored value directly inaction or description with {{name}}.
should_run with ctx.variables["name"].
Inside parallel blocks
Anoutput_variable set inside a parallel([...]) branch is visible to every step after the block, keyed by that exact name.
output_variable, the later-declared branch wins and a warning is logged — give them distinct names. See Named outputs from branches for the full merge rule.
Best Practices
Name variables for what they hold
Name variables for what they hold
Use clear names like
research_data or score so downstream {{name}} references read naturally.Set output_variable on the producing task
Set output_variable on the producing task
Attach
output_variable to the task that creates the value, not the one that reads it.Order dependent tasks with context
Order dependent tasks with context
Pass
context=[producer_task] on the consumer so the team runs them in the right order.Related
Handler Tasks
Run Python code as a task step
Conditions
Gate tasks with should_run
Workflows
Chain agents into pipelines

