session_state, which can be accessed and updated in tools, then automatically persisted to your database.
How State Works
State in Agno follows this pattern:- Initialize - Set default
session_statewhen creating agents, teams, or workflows - Access - Tools access state via
run_context.session_state - Update - Modifications are automatically persisted to the database
- Load - Subsequent runs in the same session retrieve the stored state
Basic Example
Here’s a simple agent that maintains a shopping list:Learn more
Agent State
Learn about state in agents.
Team State
Learn about state in teams.
Workflow State
Learn about state in workflows.
Developer Resources
- View the Agent schema
- View the Team schema
- View the Workflow schema
- View the RunContext schema