> For the complete documentation index, see [llms.txt](https://entermirari.gitbook.io/entermirari-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://entermirari.gitbook.io/entermirari-docs/the-six-rites/memory-atlas.md).

# III. Memory Atlas

The Atlas is the agent's long-term mind. It's a flat, queryable list in the UI; under the hood it's a weighted graph that gets *folded into the system prompt* every time you talk to your Hermes Agent.

## What a memory node looks like

```ts
type MemoryNode = {
  id: string;
  user_id: string;        // RLS-scoped
  label: string;          // the fact itself
  category: string | null;// "fact" | "preference" | "goal" | "style" | ...
  strength: number;       // 0.0–1.0
  source: string | null;  // "conversation:<id>" | "mirror:<id>" | "manual"
  created_at: string;
};
```

## How strength works

* New nodes start at **0.5**.
* Nodes ≥ **0.75** are auto-injected into the next chat call.
* Every time a node is *referenced* by Mirror Mode or the agent's response, its strength bumps up.
* Nodes that go unused for \~14 days decay slightly.

The result: facts you actually use stay sharp; facts that turn out to be noise quietly fade.

## The Atlas page

```
┌─────────────────────────────────────────────────────────┐
│ search: ▢                              [+ add manually] │
│ ─────────────────────────────────────────────────────── │
│ ✶ User ships on Cloudflare Workers      0.92  preference│
│ ✶ Prefers Tailwind tokens, never raw hex 0.88 style     │
│ ◌ Tuesday is no-meeting day              0.71 fact      │
│ · Likes lowercase commit messages        0.41 style     │
└─────────────────────────────────────────────────────────┘
```

You can:

* **Add manually** — pure form input, no LLM round-trip.
* **Edit** — fix typos, tweak category, bump or knock down strength.
* **Promote/demote** — the two arrows next to strength.
* **Delete** — gone forever.
* **Filter** — by category or full-text on label.

## How it lands in a prompt

When the Console fires a chat turn, the server fn does roughly:

```ts
const atlas = await supabase
  .from("memory_nodes")
  .select("label,category")
  .gte("strength", 0.75)
  .order("strength", { ascending: false })
  .limit(40);

const systemPrompt = [
  baseSystem,
  "## Persistent Memory",
  ...atlas.data!.map(n => `- (${n.category ?? "fact"}) ${n.label}`),
].join("\n");
```

That's the whole trick. No vectors, no rerankers — just *the things you've explicitly chosen to remember*, in plain text, at the top of every prompt.

## Why a graph instead of a vector store

* **Auditability.** You can read your agent's memory and know exactly why it said what.
* **Cheap to host.** No GPU sidecar.
* **Editable.** Bad memory? Open it and fix it.
* **Shareable.** Templates can ship seed memory along with skills.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://entermirari.gitbook.io/entermirari-docs/the-six-rites/memory-atlas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
