> ## Documentation Index
> Fetch the complete documentation index at: https://docs.komodor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory

> What an agent learned in one run and wrote down for its future self — reviewed before it is published, and searchable by the agents you bind to it.

Memory is how an agent carries something forward. A run that worked out why a service was slow can
write that down, and a later run of the same agent finds it instead of re-deriving it. This page
covers what a memory is, the spaces that hold them, the review every write passes through before
anyone can read it, and what you see on the Memory screen.

<Note>
  Memory is per agent, not per workspace. An agent reads only the spaces it is bound to, so a memory
  written by one agent is invisible to another until you bind it.
</Note>

## Spaces hold memories

A **space** is a named collection — *Production incidents*, say — and you bind agents to it. Binding
is the whole access model: an agent with no space bound to it gets no results from a memory search,
and an agent bound to two spaces searches both.

The Memory screen gives you **Manage spaces** to create and bind them, **Manage memories** to read
and retire individual entries, and **Activity** for what the review pass has been doing.

## Every write is reviewed before anyone can read it

This is the part worth understanding, because it is not what "the agent saves a note" suggests.

| Status         | What it means                                                                                          |
| -------------- | ------------------------------------------------------------------------------------------------------ |
| **Draft**      | Where every write lands. A draft reaches nobody — not another run, and not even the run that wrote it. |
| **Active**     | Published and retrievable. The only status a search can return.                                        |
| **Superseded** | Replaced by a later memory that says it better.                                                        |
| **Archived**   | Retired, not wrong — kept for the record, out of retrieval.                                            |

The quarantine exists for a specific failure: an agent that learns one lesson often saves it three
slightly different ways in the same run. Holding every write as a draft means nothing is published
until something has compared the three.

## What happens after a run

Three stages, and each one is an ordinary run you can open and read.

<Steps>
  <Step title="The agent is asked what to remember">
    The same agent resumes a **copy** of its own thread and is asked what should be remembered. It
    answers with the full context of the work it just did, rather than a summary of it. Because the
    thread is copied, the conversation you were having is never touched.
  </Step>

  <Step title="The drafts are reviewed">
    A reviewer is handed the drafts, the run's transcript, and any existing memories the drafts may
    duplicate — so the decision is made with the alternatives in view.
  </Step>

  <Step title="The decision is applied">
    Each draft is promoted, rewritten, merged into an existing memory, or rejected. **Activity**
    reports the outcome plainly: *2 created, 1 combined, 1 removed*.
  </Step>
</Steps>

### Writing the same thing twice writes it once

A write whose text already exists in any space the agent reads returns the existing memory rather
than adding a second copy. Agents that re-learn the same fact do not inflate the space.

### A coherence pass runs on the space itself

Every six hours a sweep asks a question no single run can: **is this space still coherent?** Two
memories written weeks apart that say the same thing, one that contradicts another, wording that has
aged badly — none of that is visible to a pass looking at one run's output.

A space holding fewer than two memories is skipped, since deduplication, merging, and contradiction
all need something to compare against.

## How a search finds a memory

A search runs two ways at once — keyword matching and meaning-based matching — and the results are
fused into one ranking. Ranking is by each hit's **position** in that fused list rather than by its
raw score, because the two methods produce scores on scales an order of magnitude apart; ranking on
the raw number put every meaning-matched memory above every keyword-matched one regardless of the
evidence.

Agents reach memory through two tools: one to search it, one to save to it.

<Warning>
  Memories do not expire on their own. There is no time-to-live and no automatic retirement by age —
  retiring a memory is something you or the coherence pass does. Treat a space as something with an
  owner, not a cache that cleans itself.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Knowledge base" href="/manage-your-agents/build/knowledge-base">
    Documents you upload, as opposed to what an agent learned on its own.
  </Card>

  <Card title="Knowledge graph" href="/manage-your-agents/optimize/knowledge-graph">
    Explore what the fleet knows and how entities connect.
  </Card>

  <Card title="Runs & evidence" href="/manage-your-agents/run/runs-evidence">
    The digest and review stages are runs — open them like any other.
  </Card>

  <Card title="Skills" href="/manage-your-agents/build/skills">
    Know-how you author deliberately, rather than something learned.
  </Card>
</CardGroup>


## Related topics

- [Knowledge graph](/manage-your-agents/optimize/knowledge-graph.md)
- [Limits & quotas](/reference/limits-quotas.md)
- [Integrations overview](/manage-your-agents/build/integrations-overview.md)
- [Architecture](/get-started/architecture.md)
- [Deployment methods](/get-started/deployment-methods.md)
