ZeroMemory
ZeroMemory gives AI agents persistent cognitive memory. Three memory tiers — working, episodic, and semantic — with automatic consolidation, decay scoring, and GraphRAG hybrid retrieval.
Why ZeroMemory
| Problem | Solution |
|---|---|
| Agents forget between sessions | Persistent memory across sessions |
| Flat vector search misses connections | GraphRAG combines vectors + knowledge graph |
| No way to prioritize memories | Importance-weighted decay scoring |
| Manual memory management | Automatic consolidation between tiers |
| Entity relationships lost | Auto-extraction into knowledge graph |
Memory Tiers
| Tier | Purpose | Lifespan |
|---|---|---|
| Working | Active task context | Hours |
| Episodic | Past interactions and events | Days-weeks |
| Semantic | Long-term knowledge and facts | Permanent |
Memories automatically consolidate from working → episodic → semantic based on access patterns and importance scores.
Quick Start
1. Store a memory
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/remember \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "User prefers dark mode and uses Python for backend work",
"metadata": {"user_id": "u_123", "source": "onboarding"}
}'
2. Recall by meaning
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/recall \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "What does the user prefer?",
"user_id": "u_123",
"limit": 5
}'
3. Forget
curl -X POST https://api.ainative.studio/api/v1/public/memory/v2/forget \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user_id": "u_123"
}'
Core Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /memory/v2/remember | Store a memory |
| POST | /memory/v2/recall | Semantic search across memories |
| POST | /memory/v2/forget | Delete memories |
| POST | /memory/v2/reflect | Agent self-reflection |
| GET | /memory/v2/profile | Build user profile from memories |
| POST | /memory/v2/relate | Find entity relationships |
| POST | /memory/v2/process | Batch process memories |
Scoring Algorithm
Memories are ranked using blended scoring:
final_score = (similarity × 0.5) + (importance × 0.3) + (recency × 0.2)
- Similarity — Cosine distance between query and memory embeddings
- Importance — Assigned at storage time, increases with access
- Recency — Decays over time, refreshes on access
Benchmarks
ZeroMemory achieved 100% Recall@1 and 94% QA accuracy on the LongMemEval benchmark (ICLR 2025):
| System | Recall@1 | QA Accuracy |
|---|---|---|
| ZeroMemory | 100% | 94% |
| GPT-4o (full context) | ~70% | ~70% |
| Letta/MemGPT | 40% | — |
| Mem0 | 25% | — |
Next Steps
- GraphRAG — Hybrid vector + knowledge graph search
- Context Graph API — Entity management and traversal
- MCP Memory Server — 6-tool MCP integration