- Agent/Team sessions = conversation history (messages back and forth)
- Workflow sessions = execution history (complete pipeline runs with results)
When to Use Workflow Sessions
Use workflow sessions when you need to:- Track workflow execution history across multiple runs
- Share state between steps in a workflow (like passing data between pipeline stages)
- Enable workflows to learn from previous runs by accessing past inputs and outputs
- Persist workflow results for analysis and debugging
- Maintain context across multiple workflow executions
How Workflow Sessions Work
When you create a workflow with a database, Agno automatically manages sessions for you:- Creates a unique
run_idfor this execution - Stores the input, output, and all step results
- Updates the session with the new run
- Makes the history available for future runs
Workflow Session Structure
A workflow session stores:Unlike agent sessions, workflow sessions don’t have a
summary field. Workflows store complete run results instead of creating summaries.What Gets Stored
Each workflow run stores:- Input: The data passed to
workflow.run() - Output: The final result from the workflow
- Step results: Output from each step in the pipeline
- Session Data: Execution time, status, metrics
- Session state: Shared data between steps (if used)
Key Differences from Agent/Team Sessions
If you’re familiar with agent or team sessions, here are the main differences:| Feature | Agent/Team Sessions | Workflow Sessions |
|---|---|---|
| What’s stored | Messages and conversation turns | Complete workflow runs with step results |
| History type | Message-based (chat history) | Run-based (execution history) |
| Summaries | Supported with enable_session_summaries | Not supported (stores complete runs) |
| History format | Messages in LLM context | Previous run results prepended to step inputs |
Database Options
Workflow sessions require a database to persist execution history. Agno supports multiple database types:Database Configuration Guide
See all supported databases, connection options, and production recommendations
Workflow History
Workflow history lets workflow steps access results from previous runs. When enabled, Agno formats prior run results and prepends them to each step input so future executions can build on that context.Enable history for your steps
Why it helps:
- Access previous runs instead of repeating work
- Reference past decisions to keep outputs consistent
- Maintain context across multi-run workflows
- Build on prior results for richer analysis
History format
Agno wraps past runs in a structured XML block before inserting it into each step input:Session Naming
Give your workflow sessions meaningful names for easier identification:Manual Naming
Auto-Generation
Workflow sessions can auto-generate timestamp-based names:Next Steps
Now that you understand workflow sessions, explore these features:Workflow History
Enable workflows to learn from previous runs
Session State
Share data between workflow steps across runs
Session Management
Manage session names, IDs, and organization
Conversational Workflows
Make workflows interactive with WorkflowAgent
Metrics
Track workflow performance and usage
Database Setup
Configure databases for session storage
Developer Resources
- View the Workflow schema
- View the WorkflowSession schema
- Browse workflow session examples