Skip to main content

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

ProblemSolution
Agents forget between sessionsPersistent memory across sessions
Flat vector search misses connectionsGraphRAG combines vectors + knowledge graph
No way to prioritize memoriesImportance-weighted decay scoring
Manual memory managementAutomatic consolidation between tiers
Entity relationships lostAuto-extraction into knowledge graph

Memory Tiers

TierPurposeLifespan
WorkingActive task contextHours
EpisodicPast interactions and eventsDays-weeks
SemanticLong-term knowledge and factsPermanent

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

MethodPathDescription
POST/memory/v2/rememberStore a memory
POST/memory/v2/recallSemantic search across memories
POST/memory/v2/forgetDelete memories
POST/memory/v2/reflectAgent self-reflection
GET/memory/v2/profileBuild user profile from memories
POST/memory/v2/relateFind entity relationships
POST/memory/v2/processBatch 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):

SystemRecall@1QA Accuracy
ZeroMemory100%94%
GPT-4o (full context)~70%~70%
Letta/MemGPT40%
Mem025%

Next Steps