SurrealDB home

Agent memory

Agents forget everything, every single time.

Every session starts from nothing. The agent re-fetches the same context, re-reads the same documents and re-derives the same conclusion a colleague reached last Tuesday. That is not a model problem, and a longer context window does not fix it. It is a missing layer.

Files and databases hold current state. Agent memory holds every value a fact has had, and when it was true.

The graph says what is true now. Memory says why it changed, and what was already concluded.

6categories of memory
1engine underneath
~74%fewer tokens, illustrative
7signals in one ranking

Explore SurrealDB Agent Memory

Part one

What agent memory actually is

Ask three vendors what memory means and you get three answers. SurrealDB Agent Memory sorts what it stores into six categories, and every fact in them is an attribute, a relation or an action, with its source, its confidence and when it was true. A seventh card covers recall, the part that brings them back. Three cards open onto a real memory captured by a working agent; the others describe the category without an invented example.

Search asks "what is most similar?". Recall also asks "what is recent, what matters, and what is related?" SurrealDB for AI engineers, lesson 06
Part two

Where it fits in what you already run

Two different questions, and they get different answers. The systems your data already lives in stay exactly where they are: a context layer reads from them. The stores you added to serve the agents are the ones worth consolidating. Tick both rows and the diagram redraws around you. Not everything collapses into one engine, and the panel says which stores stay.

Scroll the diagram sideways to see the whole flow

The composition happens in the context window, and the context window has no access-control model. It is a text buffer. The architecture had no place to say no. SurrealDB for AI engineers, lesson 08
Part three

One question, two architectures

The same request, answered twice. On the left an agent with no memory. On the right the same agent with a memory layer underneath it. Step through and watch where the tokens go.

No memory

Re-derives the answer from source every time

0tokens

    With agent memory

    Recalls what was already concluded, then writes back

    0tokens

      These figures are illustrative, not a benchmark. They come from an internal worked example of a single support-style question, and nothing here has been measured against your workload. The shape of the saving is the durable part: the cost of re-derivation scales with how much of your context is genuinely re-derivable. Your own numbers depend on prompt size, how verbose your tools are, and how often the same question gets asked twice. Ask for a measurement against your traffic before you put a figure in a business case.

      Part four

      Why this is a budget line, not a feature request

      The interesting thing about a memory layer is not what it lets a clever engineer do. It is what it stops everyone else from having to redo.

      Knowledge becomes a write-time cost, not a read-time tax. SurrealDB Agent Memory, product brief

      It raises the floor

      It does not make your best engineer better. It makes every session start where the last one finished, which is where most of the waste actually lives.

      It compounds three ways

      With team size, with the number of projects, and with time. A knowledge layer is worth more in month twelve than in month one, which is the opposite of most tooling.

      It has a place to say no

      Permissions travel with the data and the filter runs before ranking. The same question returns different rows to different people, in the database, not in a prompt.

      See SurrealDB Agent Memory

      Explore more