There is no universal, one-size-fits-all memory solution for AI agents.
Current systems often generate and store arbitrary facts that may not be relevant to the business domain, leading to polluted memory and hallucinations.
Examples include chatbots or agents that remember irrelevant details, such as a user's waking time or pet's name, which aren't pertinent to the intended domain.
Limitations of Vector Databases and Semantic Similarity 02:24
Many frameworks simply extract and store facts in a vector database or similar storage, relying on semantic similarity for retrieval.
This approach returns information that is semantically similar but not necessarily relevant or domain-specific.
Semantic similarity retrieval can unintentionally include irrelevant facts because it lacks understanding of business context.
Necessity for Domain-Aware, Structured Memory 03:42
Vectors lack causal or relational structures; they are just projections in an embedding space.
A better solution is to build memory structures that reflect the business domain, not just improve semantic search.
Domain-aware memory allows for differentiation between relevant and irrelevant information based on business context.
A demo application (finance coach) is shown where the agent asks for domain-relevant information like annual income, student loan debt, and financial goals.
Zep stores this information as explicit business objects: financial goals, debts, income sources, etc.
Developers can define these objects and their rules using tools and languages like Pydantic, Zod, or Go structs.
Business rules for each field in these objects can be enforced, ensuring only domain-relevant data is stored.
Retrieval tools enable the agent to fetch specific business entities or snapshots, supporting concurrent filtered searches.