AsyncSqliteDb class.
Usage
async_sqlite_for_agent.py
Params
Developer Resources
- View Cookbook
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use SQLite asynchronously for session storage.
AsyncSqliteDb class.
from agno.agent import Agent
from agno.db.sqlite import AsyncSqliteDb
# Setup the SQLite database
db = AsyncSqliteDb(db_file="tmp/data.db")
# Setup a basic agent with the SQLite database
agent = Agent(db=db)
| Parameter | Type | Default | Description |
|---|---|---|---|
db_engine | Optional[Engine] | - | The SQLAlchemy database engine to use. |
db_url | Optional[str] | - | The database URL to connect to. |
db_file | Optional[str] | - | The database file to connect to. |
session_table | Optional[str] | - | Name of the table to store Agent, Team and Workflow sessions. |
memory_table | Optional[str] | - | Name of the table to store user memories. |
metrics_table | Optional[str] | - | Name of the table to store metrics. |
eval_table | Optional[str] | - | Name of the table to store evaluation runs data. |
knowledge_table | Optional[str] | - | Name of the table to store knowledge documents data. |
traces_table | Optional[str] | - | Name of the table to store traces. |
spans_table | Optional[str] | - | Name of the table to store spans. |
Was this page helpful?