# Memory overview

The Den is Foxora's memory — a persistent store that lets agents remember what matters across sessions, projects, and restarts. It runs as a local service on your machine, organizes everything into a spatial map called the Palace, and keeps a record of why it believes each thing it knows.

## What the Den is

A chat that forgets everything when you close the window isn’t much of an assistant. The Den is what lets Foxora carry context forward: the conventions of your codebase, your preferences, the decisions you made last week, the people and projects you keep coming back to. Agents read from it before they act and write to it as they learn — so the second time you ask for something, Foxora already knows the shape of the answer.

Crucially, the Den is local-first. It runs as a small daemon on your own machine (foxmemd, on 127.0.0.1:7777), and your memories live there — not on a server. That’s covered in detail in Local-first & private.

## Why it matters

- Continuity — context survives across sessions, projects, and app restarts, so agents don’t start from zero every time.
- Personalization — the Den learns how you work — your stack, your style, your recurring people and places — and tailors agents to it.
- Grounding — every memory carries a why: the conversation, file, or command it came from. Agents recall facts they can trace, not guesses.
- Privacy — because it’s local, your accumulated knowledge stays on your device.

## The four layers

Not all memory is the same. The Den sorts what it stores into four layers, from raw detail up to durable understanding:

- Raw — verbatim fragments, the unprocessed material an agent saw.
- Episodic — events: what happened, when, in a session or a task.
- Semantic — distilled facts and preferences (“uses Bun, never npm”).
- Relational — the connections between things: how people, projects, and facts relate.

Higher layers are more abstract and longer-lived; lower layers are richer and more ephemeral. Recall blends across them so an agent can answer with both the fact and the story behind it.

> Durability, not deletionMemories also carry a durability class — transient (this task), semester (this stretch of work), or permanent (a standing truth). Confidence and a freshness flag mean the Den can hold a belief loosely and re-check it, rather than treating everything it ever saw as gospel.

## The Palace — a spatial model

The Den is spatial-primary: instead of one undifferentiated pile, every memory lives at an address — a dotted locus like work.foxora.kitspace. Those addresses fold into a tree called the Palace, rooted at a fixed set of places:

- work — your jobs, projects, and codebases.
- life — people, preferences, the personal context.
- creative — writing, design, ideas.
- learning — what you’re studying and figuring out.
- vault — access-locked, for the things that need to stay private.

Thinking spatially is what makes a large memory navigable: an agent can recall everything under work.** without trawling unrelated life context, and you can browse your own memory the way you’d browse a filesystem. Walk through it in Explore the Den.

> Memory powers agents and crewsThe Den is what agents draw on to stay consistent. Pair it with the agent model and sessions to see how recall flows into a live conversation.
