- Persona memory stores the agent’s identity, personality traits, roles, expertise, and communication style.
- Toolbox memory contains tool definitions, metadata, parameter schemas, and embeddings for the agent’s capabilities.
- Conversation memory stores the history of exchanges between the user and the agent.
- Workflow memory tracks the state of multistep processes.
- Episodic memory stores specific events or experiences the agent has encountered.
- Long-term memory (knowledge base) provides the agent with a persistent store of background knowledge.
- Agent registry is a repository for facts and information about entities the agent interacts with, such as humans, other agents, or APIs.
- Entity memory stores facts and data associated with the various entities an agent interacts with during its operation.
- Working memory serves as a temporary, active processing space, which is implemented through the large language model’s context window.
That’s a lot of “memories,” but how do we bring them to life? The industry is still figuring that out, but for most enterprises today, RAG is the most common way of improving an AI application’s memory. In RAG, the AI pulls in relevant facts from a knowledge base (database) to ground its answers. Instead of relying solely on what’s packed in the model’s training (which may be outdated or too general), the AI performs a search in an external store, often a vector database, to retrieve up-to-date or detailed information. This allows the system to “remember” things it was never explicitly trained on, for example, a company’s internal documents or a specific user’s history, which it can then incorporate into its response.
By augmenting prompts with data fetched from a database, AI systems can hold a coherent conversation over time and answer domain-specific questions accurately, essentially gaining state and long-term memory beyond their fixed model parameters. It’s a way to ensure that AI doesn’t start from zero every time; it can recall what was said earlier and tap into facts beyond its training cutoff. In short, databases (particularly vector stores) are proving essential to AI’s long-term memory.
Vectors, graphs, and hybrid memories
Not all memories are created equal, of course, and not all databases work the same way. As an industry, we’re currently experimenting with different database technologies to serve as AI memory, each with strengths and trade-offs. As mentioned, vector databases are the poster child of AI memory. They excel at semantic similarity search, finding pieces of information that are related in meaning, not just by keywords. This makes them ideal for unstructured data like chunks of text: Ask a question, and find the passage that best answers it.