Skip to main content
MySQL persists agent conversations with automatic schema creation and connection pooling.
The user resumes a session; MySQL persists the full conversation history.

Quick Start

1

Simple Usage

2

With Configuration


How It Works


Configuration Options

URL formats

For async workloads, use create_conversation_store("async_mysql", ...).

Best Practices

Agent(db=db(database_url="mysql://...")) handles store wiring — no manual setup needed.
Isolate apps on one database with different prefixes: table_prefix="prod_" vs table_prefix="staging_".
Increase pool_size for high-traffic deployments; use smaller pools for serverless MySQL hosts.
Append ?ssl_mode=REQUIRED to the connection URL for encrypted connections.

MySQL Conversation Store

Direct store API and registry usage

PostgreSQL Persistence

PostgreSQL for JSONB and advanced queries