← Back to use cases Coherence

Memory for agents that run for days, not minutes

Coherence is an embeddingless memory framework for long-running LLM agents. No vector database. No embedding model. No LLM call at ingest. The whole memory state is one JSON file you can read, grep, and version-control.

What the usual stack looks like

Most memory frameworks for agents follow the same pattern. Run an embedding model on every piece of text the agent sees. Store the vectors in a vector database. At recall time, embed the query and pull the nearest neighbours.

That works. It also drags in a lot of infrastructure. A second model for embeddings. A vector database to host and maintain. A separate query path. Bills for both the storage and the compute. And the memory itself is opaque, a pile of vectors that nobody on the team can actually read.

Coherence does something simpler

Store the text verbatim. Retrieve it with the LLM you already have. Save it all to one JSON file.

from coherence import Memory

mem = Memory()
mem.ingest("Alice prefers dark mode.")
mem.ingest("Alice's daughter is named Mira.")
mem.ingest("Bob lives in Lisbon and dislikes anchovies.")

# BM25 retrieval, no LLM call
mem.recall("what does Alice prefer for the UI?")

# LLM-selection retrieval, pass any chat function
mem.recall("what does Alice prefer for the UI?", chat_fn=my_chat)

mem.save("memory.json")
mem = Memory.load("memory.json")

That is the full integration. No Postgres. No pgvector. No Chroma. No embedding model deployment.

How recall works without embeddings

Coherence has two retrieval paths. The fast one is BM25, classic keyword retrieval, with no model call at all. The accurate one is LLM-selection. The model is shown a textual listing of candidate chunks and asked which ones are relevant. The model picks the IDs. The match quality comes from the model's understanding of language, not from a vector approximation of it.

BM25 is great when the query is keyword-shaped. LLM-selection is great when the query is fuzzy or paraphrased. Most workloads benefit from both.

Why the JSON file matters

The whole memory is one human-readable JSON file. You can cat it. You can grep it. You can commit it to git. You can diff it across runs. If the agent remembers something it should not, you open the file and remove it. If the agent forgot something, you open the file and add it.

That transparency is the point. Vector memories are black boxes. The team can never really tell what is in them. Coherence's memory is the text itself, sitting in a file the team owns.

Where this lets agents go further

Most agents in production today are short-lived. They run for a few minutes, then stop. The reason is partly memory. Long-lived agents need to remember what they did yesterday without dragging a database along with them.

Coherence is what we use to give an agent a persistent identity across sessions that span days. A customer support agent that remembers each user. A coding agent that remembers what it tried last night. A research agent that remembers what it has already read.

Where it fits in the stack

Coherence is the memory layer. OpenVibe is the agent. Temenos is the sandbox. Together, they are what we use to ship agents that actually run on their own, day after day, and stay useful while they do.

Building an agent that should remember things?

Coherence is open source and pip-installable. We are happy to help you wire it into your agent.

Schedule a Demo