Short-Term Memory — ConversationManager
Short-term memory is owned by theConversationManager subsystem. It keeps the recent conversation flow for a specific channel and user scope and provides a fresh, provider-neutral context block to the prompt builder.
The scope is the tuple (guild_id, channel_id, user_id). That keeps each conversation thread isolated, even when several users are speaking in the same channel.
What it stores
- Recent conversation messages
- A bounded summary of the active thread
- The configured short-term memory limits for that conversation
What it does not do
- It does not decide provider behavior.
- It does not persist user profile facts.
- It does not own long-term canonical knowledge.
/clearmemory to clear server-side conversation history for a channel.
Long-Term Memory — User Facts
Long-term memory is the per-user fact store. After each message, Freesona runs a background fact-extraction pass. The active model decides whether the message contains a stable fact worth remembering, such as a name, location, job, project, or relationship detail.Storage and lifecycle
- Facts are stored locally in
memory.db - Keys are scoped by
(guild_id, user_id) - Facts are scored by importance from
0.0to1.0 - Only facts above the configured threshold are retained
- Older low-importance entries are pruned as newer facts arrive
Character Memory
Character Memory is a separate narrative layer. It stores persistent shared history between the active persona and the user, including things like promises, jokes, shared experiences, unfinished plans, relationship progression, and recurring decisions. This is not user profile memory. It is relationship history between the persona and the user.Key differences
Character Memory is tied to the active persona. If you switch personas, you switch the associated relationship context by design.
See the dedicated Character Memory page for configuration and command details.
Canon Framework and Guild World Context
Freesona also distinguishes between canonical truth and environment context.- Canon stores immutable, authoritative character knowledge such as identity, beliefs, motivations, rules, and world assumptions.
- Guild World Context provides per-request environment grounding — server name, channel name, channel topic, and channel list metadata — without persisting it across requests.
User Distinction and Privacy
Every message payload is tied to a stable Discorduser_id before the model sees it. That identity key keeps memory isolated per user and per server, which avoids accidental bleed from one guild to another.
Privacy expectations
- Memory is stored locally on your host.
- Data is isolated by
guild_id + user_id. - Fact extraction runs silently in the background.
- No external memory service is required.
Managing memory
View stored facts
Run/memorylist to inspect what Freesona currently knows about a user. Admins can inspect another user’s facts by supplying the optional user argument.
Clear or delete facts
/memoryclear [user]wipes a user’s stored facts./memorydelete <index> [user]removes a single fact from a list.
Character Memory commands
/charactermemory list [user]/charactermemory delete <memory_id> [user]/charactermemory clear [user]/charactermemory stats [user]