- Build on previous interactions - Reference the context of past interactions
- Avoid repetitive questions - Avoid requesting previously provided information
- Maintain context continuity - Create a conversational experience
- Learn from patterns - Analyze historical data to make better decisions
How It Works
When workflow history is enabled, previous messages are automatically injected into agent/team inputs as structured context:- As a formatted context string as shown above
- In a structured format as well for more control
A database is required to use Workflow history. Runs across different executions will be persisted there.
You can use these helper functions to access the history:
step_input.get_workflow_history(num_runs=3)step_input.get_workflow_history_context(num_runs=3)
Control Levels
You can be specific about which Steps to add the history to:Workflow-Level History
Add workflow history to all steps in the workflow:Step-Level History
Add workflow history to specific steps only:You can also put
add_workflow_history=False to disable history for a specific step.