Skip to content

Memory#

A Lens Prism agent remembers across conversations. Memory has two layers, both persisted in the embedded database, each serving a different purpose. You don't manage memory directly — the agent does, through its memory tools.

Curated memory#

A single markdown document the agent maintains itself — the same Memory document described in Agent identity. It's always present in the system prompt, so recall is instant and needs no search step. This is where the agent keeps what it has decided is worth holding onto permanently: important decisions, known issues, durable facts about your environment, recurring patterns.

It's deliberately bounded. The agent prunes and rewrites it rather than letting it grow without limit — the agent's working notes, not its archive.

Searchable memory#

An embedding-indexed store for everything else. The agent writes entries here as it works, and queries them by meaning — not keyword — when something becomes relevant. This is the archive: far larger than what could fit in the prompt, retrieved only when needed. Search runs as vector similarity, ranked by semantic closeness.

How the agent uses memory#

The agent uses three tools:

  • Write — record something worth keeping, with a category and importance. The embedding is computed in the background, so writes don't slow the conversation.
  • Search — pull back relevant past entries by meaning, optionally filtered by category and how far back to look.
  • Delete — remove entries that are no longer accurate.

In practice this is invisible: you tell the agent something, and it decides whether to fold it into curated memory, drop it into searchable memory, or both. Later, in an unrelated conversation, it can search and recall it.

To make the agent remember something, say so — "remember that we deploy on Fridays." The agent maps these to the right memory operations. To keep a fact always in view, ask the agent to add it to its curated memory specifically; for everything else, the searchable store is the default.

Persistence and backup#

Both layers live in the agent's SQLite database. Memory is included in the .prism export from the web UI, so backing up the agent backs up everything it remembers.