Search Documentation
Search across all documentation pages
Memory Management
ExoVault memories are the core data structure for persistent agent knowledge. Each memory has a type, content, importance/confidence scores, entities, and is encrypted with AES-256-GCM before storage.
Memory Types#
| Type | Purpose | Example |
|---|---|---|
fact | Objective knowledge | "The API uses PostgreSQL 16" |
skill | Learned procedures | "To deploy, run npm run build && vercel --prod" |
preference | User/system preferences | "User prefers dark mode and TypeScript" |
constraint | Rules and boundaries | "Never use MySQL in production" |
task | Actionable work items | "Implement OAuth2 login flow" |
episodic | Session summaries | "Discussed auth architecture, decided on JWT" |
correction | Knowledge updates | "API endpoint changed from /v1 to /v2" |
Writing Memories#
Use write_memory to persist knowledge:
{
"content": "The project uses Next.js 15 with App Router and server components",
"memoryType": "fact",
"importance": 4,
"confidence": 5,
"entities": ["Next.js", "App Router", "server components"],
"vaultId": "vault-uuid",
"dedup": true,
"externalWriteId": "agent:run123:fact:nextjs-stack"
}Key Parameters#
- importance (1-5): How critical this knowledge is. 5 = mission-critical, 1 = trivial.
- confidence (1-5): How certain the agent is. 5 = verified, 1 = speculative.
- entities: People, projects, tools, and concepts for cross-referencing.
- dedup: When
true, the server checks for semantic duplicates before writing. Near-duplicates (>92% similarity) are skipped; partial matches (>80%) supersede the older memory. - externalWriteId: Idempotency key. Calling
write_memorywith the sameexternalWriteIdupserts instead of creating a duplicate.
Searching Memories#
Use search_memories for hybrid retrieval combining semantic search, blind-index keyword matching, and knowledge graph expansion:
{
"query": "database configuration",
"topK": 10,
"threshold": 0.4,
"memoryType": "fact",
"compact": true
}The search pipeline:
- Semantic signal -- pgvector cosine similarity on embeddings
- Blind-index signal -- privacy-preserving keyword matching
- Graph expansion -- discovers related memories via knowledge links
- RRF fusion -- combines signals with reciprocal rank fusion
- Temporal decay -- recency-weighted re-ranking
- MMR diversity -- removes redundant results
Use compact: true for summaries, then call read_memories for full content on specific IDs.
Updating Memories#
Use update_memory to modify existing memories without creating duplicates:
{
"memoryId": "mem-uuid",
"content": "Updated content here",
"importance": 5
}Archiving Memories#
Use archive_memory to soft-delete memories. Archived memories are excluded from search by default but can be included with includeArchived: true:
{
"memoryId": "mem-uuid",
"archived": true
}Cleanup#
Use cleanup_memories to archive stale or low-value memories in bulk:
- Old episodic memories (default: >30 days, importance <= 2)
- Low-importance stale memories (importance <= 1, not updated in 14 days)
- Failed indexing entries
- Superseded memories
Set dryRun: true to preview what would be archived.
Corrections and Supersession#
When knowledge changes, create a correction memory with supersededById pointing to the old memory:
{
"content": "API endpoint moved from /v1/users to /v2/users",
"memoryType": "correction",
"supersededById": "old-memory-uuid",
"importance": 4,
"confidence": 5
}The old memory is automatically archived and linked via a supersedes relation.
Next Steps#
- Search Strategies -- When to use each search tool
- Knowledge Graph -- Link memories with typed relations
- Session Lifecycle -- Automatic checkpointing