Quick Start
How It Works
| Feature | Description |
|---|---|
| Auto-retry | Exponential backoff for .psdb.cloud hosts |
| Schema Management | Automatic table creation with SCHEMA_VERSION = "1.0.0" |
| Connection Pooling | Configurable pool size for high concurrency |
| SQL Base | Inherits unified schema from _SQLConversationStoreBase |
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
url | str | None | Complete 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 |
max_retries | int | 3 | Maximum retry attempts for failed operations |
retry_delay | float | 0.5 | Base delay between retries (seconds) |
Import Path: Due to current implementation, you must import from the submodule:This will be improved in a future release to be available from the main package.
Common Patterns
PlanetScale Configuration
For PlanetScale serverless MySQL, use optimized retry settings:Connection URL Formats
Support for various MySQL URL formats:Async Context Manager
Use with async context manager for resource management:Best Practices
Tune Retries for Serverless
Tune Retries for Serverless
Serverless MySQL databases benefit from higher retry counts:
Use Connection Pooling
Use Connection Pooling
Configure appropriate pool size for your workload:
Table Prefix for Multi-tenancy
Table Prefix for Multi-tenancy
Use table prefixes to isolate different applications:
Monitor Schema Version
Monitor Schema Version
The store uses
SCHEMA_VERSION = "1.0.0" for migration tracking:Error Handling
The store automatically handles common MySQL errors:.psdb.cloud), transient errors trigger exponential backoff retry automatically.
Related
Async Conversation Store
Async conversation persistence protocol
Persistence Backend Plugins
Extending SQL backends with _SQLConversationStoreBase

