# Memory

Connect people, facts and events, and bring them back into the conversation with evidence when they matter.

(Work in progress)

## What it remembers

People and things are entities, and aliases link the different names they go by. Facts record a state and how long it holds; events record what happened and when, as an absolute time. The original evidence links every fact and event back to its source.

Short-term memory keeps model summaries of the last 7 days, so work can carry on. Long-term memory is stored in SQLite, separate from the conversation context.

## Keeping memory up to date

When the owner's private chat fills the window, or goes quiet for a while, the core module reads the finished conversation and updates memory. Proactive events take the same path once they're handled.

A new state can replace an old fact, and the old record is kept as history. When two equally reliable sources contradict each other, the conflict is kept, and the agent asks you about it in a related conversation.

## Recalling what's relevant

Recall combines name links, jieba BM25 keyword search and optional semantic search with embeddings, then merges the results with RRF. What clears the threshold is added to the current conversation, grouped into people, things and events. English words are also matched by their stems, so "meetings" finds "meeting".

In **Models & Services**, assign the memory and embedding routes; in **Settings**, adjust memory injection and its budget. Private memory is used by the owner's agent and by proactive sessions.

## Maintaining it by talking

Just tell the agent "remember this", "forget that record" or "these two are actually the same person". It uses the matching tool, and the WebUI is there to browse memories and check their evidence.

```text Tools
memory_search    Search related memories
memory_get       Look at details and the original evidence
memory_save      Save or correct facts and events
memory_forget    Forget on request
memory_resolve   Record how a conflict was settled
```
