MySQLMemory
MySQL-optimized memory storage extending TypeORMMemory with MySQL-specific configurations and optimizations.Import
Constructor
Configuration
MySQL-specific configuration extending TypeORMMemory and BaseMemory
Basic Usage
Core Interface Methods
MySQLMemory inherits from BaseMemory and implements all standard memory interface methods with full branching support. For complete API documentation includinglist(), add(), addList(), delete(), retrieve(), clear(), getCount(), isEmpty(), and all branching methods, see the BaseMemory API Reference.
Connection String Support
Unique Features
- MySQL-Specific Optimizations: Pre-configured MySQL settings (charset, timezone, big numbers)
- Simplified Setup: Automatic DataSource creation with MySQL best practices
- Connection String Support: Easy initialization with connection strings
- Table Customization: Custom table names for events, state, and summaries
- Security Defaults: Prevents SQL injection with multipleStatements: false
- UTF-8 Support: Default utf8mb4 charset for international content
Inheritance
MySQLMemory extends TypeORMMemory, inheriting all its capabilities:- Session branching and time travel
- Context engineering and token management
- Advanced querying and filtering
- Transaction support
Limitations
- MySQL Dependency: Requires MySQL server installation and management
- TypeORM Overhead: Inherits TypeORM complexity and setup requirements