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
Store and update session state on a single agent.
Team State
Share state across a team and its members.
Workflow State
Pass state between workflow steps via run_context.