chat-state-mysql

JSON →
library 0.1.0 ·javascript
verified Jun 5, 2026

Community MySQL state adapter for Chat SDK, built with mysql2. Currently at version 0.1.0. Provides state persistence for Chat SDK bots using MySQL as the primary datastore, supporting subscriptions, distributed locking, key-value caching with TTL, and automatic table creation. Supports MySQL 5.7+. Compared to the built-in Redis adapter, this is a lighter alternative when you already have MySQL and want to avoid a separate Redis instance, though it has higher latency and lacks automatic expired row cleanup. The adapter automatically detects MYSQL_URL or DATABASE_URL environment variables, or accepts an explicit URL or an existing mysql2 pool instance. It is fully typed (TypeScript) and published on npm.