session_id. This page covers how to access and configure that storage.
Configure the Session Table
By default, sessions are stored in theagno_sessions table. The table is created automatically if it doesn’t exist.
Use session_table to store sessions in a custom table:
What Gets Stored
Each session record contains:| Field | Type | Description |
|---|---|---|
session_id | str | Unique session identifier |
session_type | str | Type of session (agent, team, or workflow) |
agent_id | str | The agent ID (if agent session) |
team_id | str | The team ID (if team session) |
workflow_id | str | The workflow ID (if 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 |
Retrieve Sessions
Useget_session() to retrieve a stored session:
Works With Teams and Workflows
Session storage works identically for Teams and Workflows:Workflow sessions store complete pipeline runs rather than conversation messages. See Workflow Sessions for details.
Next Steps
Session Summaries
Condense long conversations to save tokens.
Storage Control
Choose what gets persisted to your database.