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?
Related questions
What is a blind index?
A blind index makes it possible to search encrypted text without the words being stored in plain text in the database. For each word, a hash calculated with a secret key is stored. At search time the same hash is calculated for the search term, and the database compares hashes.
Read the answerHow do AI agents share memory between sessions?
An agent session starts with no memory of earlier sessions. Memory is shared by writing the knowledge down outside the session, in files that are loaded at start or in a service that the sessions call. Files in a repository reach the sessions in that repository. A service reaches sessions in different projects and on different computers.
Read the answer