Database selection, connection strings, credentials management, and operational guidance live in the Database overview. Reuse that setup here—this page only adds the session-specific considerations.
Quick Start
Once you have adb object (Postgres, SQLite, DynamoDB, …) configured per the storage docs, persistence is enabled simply by passing it to your Agent, Team, or Workflow:
Supported Databases
Nothing new lives here—simply reuse the database drivers and guidance from/basics/storage:
- PostgreSQL (recommended) – Production-grade, supports custom
session_tablenames for isolating workloads. - SQLite – Great for local development; swap the file path just as you would elsewhere.
- InMemoryDb – Useful for tests or demos only. Data disappears when the process exits.
Session IDs
Sessions are identified bysession_id. Use the same ID to continue a conversation:
What Gets Stored
When you configure a database, Agno automatically stores:- ✅ Messages - User inputs and agent responses
- ✅ Run metadata - Timestamps, token usage, model info
- ✅ Session state - Custom key-value data
- ✅ Tool calls - Tool usage and results (optional)
- ✅ Media - Images, audio, files (optional)
Multi-User Sessions
Useuser_id to track different users:
Session Storage Schema
When you configure a database, Agno stores sessions in a structured format. Here’s what gets saved for each session:| Field | Type | Description |
|---|---|---|
session_id | str | Unique identifier for this conversation thread |
session_type | str | Type of session (agent, team, or workflow) |
agent_id | str | The agent ID (if this is an agent session) |
team_id | str | The team ID (if this is a team session) |
workflow_id | str | The workflow ID (if this is a workflow session) |
user_id | str | The user this session belongs to |
session_data | dict | Session-specific data and state |
agent_data | dict | Agent configuration and metadata |
team_data | dict | Team configuration and metadata |
workflow_data | dict | Workflow configuration and metadata |
metadata | dict | Additional custom metadata |
runs | list | All the runs (interactions) in this session |
summary | dict | The session summary (if enabled) |
created_at | int | Unix timestamp when session was created |
updated_at | int | Unix timestamp of last update |
Next Steps
Now that you have persistence configured, explore what you can do with sessions:- Storage Control - Optimize what gets saved
- History Management - Control conversation history
- Session Summaries - Condense long conversations
- Session Management - Naming, caching, and more