Skip to content

Learn

What is the difference between agent memory and a vector database?

A vector database stores and retrieves embeddings of data and finds records that are similar in meaning to a query. Agent memory is what an agent needs to remember between sessions, however it is stored. A vector database is one way to search a memory. Keys, versions and who wrote a record are outside that definition.

Last reviewed on .

What a vector database does

Wikipedia describes a vector database as a database that stores and retrieves embeddings of data in vector space. Embeddings are mathematical representations of data in a high-dimensional space.

Vector databases use approximate nearest neighbor algorithms, so that users can search for records that are semantically similar to a given input. The article names retrieval-augmented generation (RAG) as one use.

How AgentRoots stores memory

AgentRoots stores memory as named records:

  • A root has a key, for example operations/backup.
  • Every change becomes a revision that shows who wrote it and when. Nothing is overwritten.
  • Records are archived instead of deleted.
  • Records are linked to each other with relations such as builds-on, replaces and contradicts.

Search

The search index contains no words in plain text. Each word is stored as an HMAC with a key that applies only to the biome. Search therefore matches whole words. Parts of words and meaning give no match.

Anyone who needs to find text by meaning in a large set of documents needs semantic search, and that is what a vector database does. AgentRoots does not do that. What is a blind index?