Skip to main content
Agno supports using MySQL asynchronously, with the AsyncMySQLDb class.

Usage

Install the sqlalchemy, asyncmy, and openai packages:

Run MySQL

Install docker desktop and run MySQL on port 3306 using:
async_mysql_for_workflow.py

Params

ParameterTypeDefaultDescription
idOptional[str]-The ID of the database instance. UUID by default.
db_urlOptional[str]-The database URL to connect to.
db_engineOptional[AsyncEngine]-The SQLAlchemy async database engine to use.
db_schemaOptional[str]-The database schema to use.
session_tableOptional[str]-Name of the table to store Agent, Team and Workflow sessions.
memory_tableOptional[str]-Name of the table to store memories.
metrics_tableOptional[str]-Name of the table to store metrics.
eval_tableOptional[str]-Name of the table to store evaluation runs data.
knowledge_tableOptional[str]-Name of the table to store knowledge content.
culture_tableOptional[str]-Name of the table to store cultural knowledge.
traces_tableOptional[str]-Name of the table to store traces.
spans_tableOptional[str]-Name of the table to store spans.
versions_tableOptional[str]-Name of the table to store schema versions.
create_schemaboolTrueWhether to create the database schema if it doesn't exist. Set to False when the schema is managed externally.