ZeroMemory
A cognitive memory system for AI agents — not just a vector store. ZeroMemory organizes what an agent remembers into four tiers, provides Mem0-style remember / recall / forget operations, and layers a knowledge graph on top.
Four memory tiers
Every memory is written with a memory_type of one of these four — the exact set defined in the ZeroMemory service.
Short-lived, in-progress context for the current task or conversation.
What happened — specific events and interactions. The default tier when none is specified.
Durable facts and consolidated knowledge. Reflection distills clusters of episodic memories into semantic insights here.
How-to knowledge: skills and recurring workflows an agent has learned, first-class alongside the classic trio.
A memory can move up the hierarchy — working → episodic → semantic — via a promote operation.
Core operations: remember, recall, forget
POST /api/v1/public/memory/v2/remember
Stores a memory. Content is scanned and sanitized (hidden Unicode / HTML comment injection stripped) before storage, assigned an importance score, and written immediately — its vector embedding is generated asynchronously in the background rather than blocking the response.
POST /api/v1/public/memory/v2/recall
Searches memories by meaning: generates an embedding for the query and ranks results by vector similarity blended with importance and recency, falling back to importance + recency alone when no embeddings exist yet. Optional flags include layer (restrict to one memory tier), as_of (historical recall as of a timestamp), and use_graph — see the GraphRAG page for that one.
POST /api/v1/public/memory/v2/forget
Deletes a memory by id, or by namespace.
Reflection: turning episodes into knowledge
A reflect operation scans an entity's recent episodic and working memories and synthesizes them into new semantic memories — consolidating specific events into durable, reusable facts rather than keeping every conversation turn around forever.
Knowledge graph, not just a vector store
Alongside the memory tiers, ZeroMemory maintains a graph of entities and relationships — subject/predicate/object triples with a confidence score — that vector search alone can't represent. That graph layer, and how it combines with vector search for hybrid retrieval, is covered on the dedicated GraphRAG page.
Namespacing is required, not optional
Every write must specify a namespace — global, project:<id>, or session:<id> — there is no silent fallback. Reads are scoped to a namespace by default too, so one agent's session memories don't leak into another's unless you explicitly opt into cross-namespace search.
Try it
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/remember \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers dark mode",
"memory_type": "episodic",
"namespace": "global"
}'