# How memory works

> From what you add to what comes back, and how anything can be taken out again.

What you add becomes sources and facts, what comes back reads only from those, and anything can be taken out again.

## You add sources; Geniffy keeps facts

What you add is a **source**: a note, a web page, a PDF or Word file, or a conversation. Geniffy reads it
and keeps each fact in it as its own **memory**, with the source it came from:

> "Priya Nair signs the Lumen renewal, and it comes up in March. She prefers WhatsApp to email."

becomes three memories:

- Priya Nair signs the Lumen renewal.
- The Lumen renewal comes up in March 2027.
- Priya Nair prefers WhatsApp to email.

Reading takes a few seconds. `sources.wait(id)` holds until it is done; until then the source says it is
still reading.

## What it does while reading

- **Dates are made real.** "Comes up in March", added in October, is kept as March 2027.
- **People stay people.** In a conversation, what the user says becomes facts about the user, not about
  your assistant. System and developer messages are skipped.
- **Each memory has a kind**: people, plans and dates, preferences, or details. You can filter by kind
  when you list, search or build context.
- **What changes is kept as history.** When a later source says something different, the newer fact
  serves and the older one is kept as its history, so you can see what changed and when.
- **Secrets are not kept.** Passwords, tokens, card numbers and Aadhaar numbers in what you add are
  redacted: a memory can say one was mentioned, never what it was. The same goes for a question.

## What comes back

`context`, `ask` and `search` read from the memories, never from somewhere else. `context` and `ask`
judge whether anything stored bears on the question, and say so in words when nothing does. See
[Recall](https://docs.geniffy.com/recall).

## Taking it out again

Everything is removable, at three sizes:

| To remove | Call | What goes |
| --- | --- | --- |
| One memory | `memories.delete(id)` | That fact |
| One source | `sources.delete(id)` | The source, and every memory only it taught |
| One user | `forget_space(space)` | Everything held for them |

A memory that is wrong can also be corrected instead: `memories.correct(id, text)` says what is right,
and the wrong version is kept as its history rather than used again. See
[Correct and forget](https://docs.geniffy.com/correct-and-forget).

## Where it is kept

Each deployment keeps its data in one region, and the Geniffy app shows which under **Settings**.
Your key reaches only your own memory and the spaces beneath it.

Source: https://docs.geniffy.com/how-memory-works
