Character Memory uses the (guild, user, persona) triple as its scope. Memories are tied to the active persona. Switching personas starts a fresh relationship history. All data is stored locally in SQLite. No data leaves your server.
What Character Memory Stores
Character Memory tracks six categories of shared history:How It Works
Extraction Pipeline
Character Memories are not created manually. After every user message, Freesona runs a background extraction pass. The pass performs these steps:- Collect context — The system pulls recent conversation history from the Conversation Manager.
- Analyze — The active AI model identifies new memories formed in this exchange.
- Score importance — The system assigns each candidate memory an importance score from 0.0 to 1.0.
- Filter — The system keeps only memories scoring above the configured minimum threshold. The default threshold is 0.3.
- Persist — The system writes to the local SQLite database. A per-scope cap of 50 memories is enforced.
Extraction runs silently. Users receive no notification when a memory is stored. This keeps conversation flow natural.
Injection
When generating a response, Freesona retrieves the user’s Character Memories for the active persona. The system injects them into the system prompt as a[Character Memory] block. The model sees the full shared history. This includes promises kept, jokes referenced, and activities resumed. This creates continuity that feels personal.
Scope and Isolation
- Per guild — Memories in Server A are invisible in Server B.
- Per user — User A’s memories are never visible to User B.
- Per persona — Switching personas resets the relationship context by design.
Configuration
All Character Memory settings are runtime config. Change them with/config set. They take effect immediately. No restart is required.
Example Usage
The file path can also be set via the
CHARACTER_MEMORY_FILE_PATH environment variable in .env. The runtime config key takes precedence if both are set.Commands
All commands have prefix aliases:
~charmemlist, ~charmemdel, ~charmemclear, ~charmemstats.Relationship to Other Memory Systems
Freesona has three distinct memory layers. Understanding the difference helps you configure each appropriately:
Key distinction: Long-Term Memory stores facts about the user. Character Memory stores history between the user and the persona.
Privacy and Data Control
- Local only — The SQLite database (
character_memory.dbby default) never leaves your host. - User control — Users can view, delete, or clear their own memories at any time.
- Admin oversight — Administrators can manage any user’s memories.
- Per-persona isolation — Switching personas cleanly separates relationship contexts.
Limitations
- Extraction quality depends on the active AI model’s ability to identify narrative-significant moments.
- Memories are text-only. No media, embeds, or structured data.
- The 50-memory cap per scope means very long relationships will prune older, less important memories.
- No cross-persona memory sharing by design.
Related Documentation
- Long-Term Memory — Fact extraction and user profiles
- Persona System — Persona switching affects Character Memory scope
- Configuration — Runtime config keys for tuning extraction behavior
- Knowledge Base — Persona-agnostic document retrieval (separate system)