Quick Start
How It Works
| Feature | Description |
|---|---|
| Schema management | Auto-creates sessions and messages tables (SCHEMA_VERSION = "1.0.0") |
| Connection pooling | Configurable pool_size for concurrent agents |
| URL parsing | mysql://user:pass@host:port/database format supported |
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
url | str | None | Full MySQL URL (overrides individual options) |
host | str | "localhost" | MySQL server hostname |
port | int | 3306 | MySQL server port |
database | str | "praisonai" | Database name |
user | str | "root" | Database username |
password | str | "" | Database password |
table_prefix | str | "praison_" | Prefix for table names |
auto_create_tables | bool | True | Create tables automatically |
pool_size | int | 5 | Connection pool size |
create_conversation_store("async_mysql", ...) with aiomysql.
Best Practices
Use db() for most agents
Use db() for most agents
Agent(db=db(database_url="mysql://...")) is the simplest path — no manual store wiring needed.Set table_prefix for multi-tenancy
Set table_prefix for multi-tenancy
Isolate apps on one database with different prefixes:
table_prefix="prod_" vs table_prefix="staging_".Tune pool_size for concurrency
Tune pool_size for concurrency
Increase
pool_size for high-traffic deployments; use smaller pools for serverless MySQL hosts.Use SSL in production
Use SSL in production
Append
?ssl_mode=REQUIRED to the connection URL for encrypted connections.Related
MySQL Persistence
MySQL overview with SSL and production patterns
Persistence Backend Plugins
Extend SQL backends via the registry

