AI Memory — Persistent Memory for AI Agents & Applications
ZeroMemory gives your AI agents a long-term memory that survives context window limits. Remember user preferences, recall past decisions, forget outdated facts, and reflect on accumulated knowledge — with a 96.1% LoCoMo benchmark score, the best published result in the field.
What is AI memory?
Every large language model has a context window — typically 8K to 200K tokens. When a conversation exceeds that limit, the model forgets everything outside it. This is a fundamental constraint of transformer architecture.
AI memory systems solve this by storing experiences outside the model and retrieving the most relevant information when needed. Rather than fitting everything into the context window, the agent queries its memory store and injects only the relevant facts.
ZeroMemory implements a three-tier memory model: working memory (current session), episodic memory (past events), and semantic memory (consolidated knowledge). Each tier has different retrieval and decay characteristics.
Every conversation starts blank. Users repeat themselves. Agents cannot improve over time. Long tasks lose context.
Agents accumulate knowledge. Users are recognized. Context is retrieved on demand. Long tasks maintain coherence across sessions.
Why AI agents need persistent memory
Stateless agents are limited to single-turn tasks. Agents with persistent memory can handle long-horizon goals, learn from feedback, and build relationships with users over time.
Long-horizon task completion
Tasks that span days or weeks need memory to track progress, decisions made, and blockers encountered.
Personalization at scale
An agent serving 10,000 users needs per-user memory to avoid generic responses and provide genuinely helpful context.
Continuous improvement
Agents that remember past mistakes and corrections improve over time — a prerequisite for RLHF-style feedback loops.
Multi-agent coordination
Agent swarms share state through memory. Sub-agents hand off context to orchestrators without losing information.
Procedural knowledge
Agents that remember how to do things — workflows, preferences, tooling choices — become faster and more reliable over time.
Accountability and audit
Persisted memory provides a full audit trail of agent decisions — essential for enterprise and regulated environments.
ZeroMemory API
Six first-class memory operations. Each maps to a distinct cognitive function, inspired by cognitive science models of human memory.
Store a new memory with semantic embedding, metadata, and importance score.
Retrieve memories most relevant to the current query, filtered by user/session.
Remove specific memories or decay importance scores on stale data.
Synthesize recent memories into higher-order summaries and update knowledge graph.
Create explicit relationships between memories in the knowledge graph.
Return a structured profile of what the system knows about a user or agent.
LoCoMo Benchmark — 96.1%
The Long Conversation Memory (LoCoMo) benchmark tests how accurately a memory system can recall facts from long, multi-session conversations. ZeroMemory achieved 96.1% accuracy over 18 iterations — the best published score as of 2026-06.
LoCoMo evaluates memory systems on their ability to correctly answer questions about conversations that span many turns and sessions. The benchmark covers factual recall, temporal reasoning, and relational reasoning. ZeroMemory's 96.1% score was achieved using a hybrid approach: dense vector retrieval for semantic similarity, BM25 for exact-match queries, and a knowledge graph for relational reasoning between entities.
ZeroMemory vs Mem0 vs Letta
A side-by-side comparison of the three leading AI memory platforms for agent developers.
| Feature | ZeroMemory | Mem0 | Letta |
|---|---|---|---|
| LoCoMo benchmark | 96.1% | Not published | Not published |
| Memory operations | remember/recall/forget/reflect/relate/profile | remember/recall/forget | Limited |
| Knowledge graph (GraphRAG) | Yes | No | Partial |
| MCP native tools | 6 tools | No | No |
| Multi-tier memory | Working + episodic + semantic | Flat | Flat |
| Self-serve free tier | Yes, no CC | Limited | Contact sales |
| Open-source SDKs | PyPI + npm | PyPI only | PyPI only |
| Offline mode | zerodb-local | No | No |
| LangChain integration | Yes (published) | Yes | No |
Code Examples
The ZeroMemory API is simple enough to integrate in minutes. Here are the most common operations in Python and JavaScript.
Remember & Recall
from zerodb import ZeroDB
db = ZeroDB(api_key="zdb_...", project_id="your-project")
# Store a memory
db.memory.remember(
user_id="user_123",
session_id="session_abc",
content="Alice prefers dark mode and uses Neovim as her editor.",
metadata={
"source": "conversation",
"importance": 0.85,
"tags": ["preferences", "tooling"],
},
)
# Recall relevant memories for the current query
results = db.memory.recall(
user_id="user_123",
query="What editor setup should I recommend?",
limit=5,
)
for memory in results:
print(f"[{memory.score:.2f}] {memory.content}")
# [0.93] Alice prefers dark mode and uses Neovim as her editor.Reflect — consolidate memories
# Reflect: synthesize recent memories into higher-order summaries
summary = db.memory.reflect(
user_id="user_123",
lookback_hours=24,
strategy="summarize", # or "extract_entities", "update_graph"
)
print(summary.insights)
# [
# "Alice is working on a billing refactor and prefers Python.",
# "Alice uses Neovim, prefers dark mode, and values clean code.",
# "Alice has blocked on the Stripe webhook integration since yesterday.",
# ]Profile — structured user knowledge
import { ZeroDB } from 'zerodb';
const db = new ZeroDB({ apiKey: 'zdb_...', projectId: 'your-project' });
// Get a structured profile of everything ZeroMemory knows about a user
const profile = await db.memory.profile({ userId: 'user_123' });
console.log(profile);
// {
// preferences: { editor: 'Neovim', theme: 'dark', language: 'Python' },
// currentProjects: ['billing-refactor', 'auth-service'],
// recentBlockers: ['Stripe webhook validation'],
// communicationStyle: 'concise, prefers code over prose',
// }Use Cases
AI memory is the foundation of any agent that interacts with users over time.
Personal AI assistants
Assistants that remember your preferences, recurring tasks, and past decisions — without repeating yourself every session.
Customer support agents
Agents that recall the full history of a customer's interactions, purchases, and prior tickets — resolving issues faster.
Coding assistants
Agents that remember your codebase conventions, architectural decisions, and preferred libraries across long projects.
Research agents
Agents that accumulate and organize knowledge across hundreds of research sessions, linking related discoveries.
Sales automation
Agents that track every interaction with a prospect, surface relevant context at follow-up, and maintain relationship history.
Game NPCs
Game characters that remember what the player has told them, adapting dialogue and behavior across play sessions.
Frequently Asked Questions
What is AI memory?
AI memory refers to a system that allows AI agents and language models to store, retrieve, and manage information across multiple conversations and sessions — beyond the limits of a single context window.
Why do AI agents need persistent memory?
Without persistent memory, every conversation starts from scratch. Agents cannot remember user preferences, prior decisions, or past interactions. Persistent memory lets agents accumulate knowledge and improve over time.
What is the LoCoMo benchmark?
LoCoMo (Long Conversation Memory) is an academic benchmark testing how accurately an AI memory system can recall facts from long conversations. ZeroMemory scores 96.1% — the highest published score as of 2026-06.
How does ZeroMemory compare to Mem0?
ZeroMemory scores 96.1% on LoCoMo. ZeroMemory also offers a knowledge graph (GraphRAG), MCP native tools, multi-tier memory (working/episodic/semantic), and a free tier with no sales call required.
Can I use ZeroMemory with LangChain or LlamaIndex?
Yes. ZeroMemory integrates with LangChain via langchain-zerodb (pip install langchain-zerodb) and LlamaIndex via llama-index-vector-stores-zerodb. Both packages are on PyPI.
Is there a free tier for ZeroMemory?
Yes. ZeroMemory includes 1,000 free API credits per month with no credit card required. Sufficient for personal projects and prototyping.
Give your agents a memory that lasts
ZeroMemory: 96.1% LoCoMo accuracy. Six memory operations. Free tier. No credit card. No sales call.