Search Documentation
Search across all documentation pages
Best Practices
This page covers best practices for agents using ExoVault to manage memories, notes, and knowledge effectively.
Search Before Writing#
The single most important practice: always search before writing a memory.
1. search_memories("user database preference")
2. Evaluate results:
a. Exact match found → skip writing
b. Outdated match found → write with supersededById pointing to old memory
c. No match → write new memory with dedup:trueThis approach:
- Prevents duplicate memories (even with dedup, searching first is more efficient)
- Provides the agent with existing context
- Enables supersession (updating rather than duplicating)
Entity Extraction#
Always include entities when writing memories. Entities improve search accuracy and enable knowledge graph connections.
What Makes a Good Entity#
| Good Entities | Bad Entities |
|---|---|
PostgreSQL | database (too generic) |
Next.js | framework (too generic) |
production | important (not an entity) |
Supabase | cloud (too vague) |
auth-service | the thing (meaningless) |
Extraction Guidelines#
- Extract proper nouns (technology names, project names, people)
- Extract environment names (production, staging, development)
- Extract specific concepts (not generic categories)
- Include 2-5 entities per memory (not too few, not too many)
- Keep entities as they would naturally appear (capitalized, hyphenated, etc.)
Memory Type Selection#
Use the correct type for each piece of information. Mistyped memories reduce search quality.
| Situation | Correct Type | Wrong Type |
|---|---|---|
| "I prefer dark mode" | preference | fact |
| "Never use MySQL" | constraint | preference |
| "The API endpoint is /api/users" | fact | skill |
| "Use Drizzle ORM for queries" | skill | fact |
| "Fix the login bug" | task | fact |
| "Session: Debugged auth flow" | episodic | fact |
| "Actually, the port is 3001 not 3000" | correction | fact |
Memory Quality#
Write Clear, Specific Content#
Good:
{
"content": "User requires all PostgreSQL migrations to be backward-compatible. Rolling deployments mean old and new code run simultaneously, so additive-only schema changes are mandatory.",
"summary": "PostgreSQL migrations must be backward-compatible for rolling deployments",
"memoryType": "constraint",
"importance": 5,
"confidence": 5,
"entities": ["PostgreSQL", "migrations", "rolling deployments"]
}Bad:
{
"content": "Something about database migrations",
"memoryType": "fact",
"importance": 3
}Use Summaries#
The summary field (max 2,000 chars for write-memory, max 500 for checkpoint memories) is used in summary-only mode during session_start. Write summaries as if they need to convey the key point in one sentence.
Include Write Reasons#
The writeReason field helps with auditing and understanding why a memory exists:
{
"content": "...",
"writeReason": "User explicitly stated this preference during project setup discussion"
}Knowledge Graph Linking#
When to Link#
- When a new memory derives from an existing one
- When a memory contradicts or refines another
- When a memory is part of a larger concept
- When a memory references a note
Link Types#
| Relation | When to Use |
|---|---|
derived_from | New memory builds on an existing one |
contradicts | New information conflicts with existing |
refines | New memory adds detail to an existing one |
part_of | Memory is a component of a larger concept |
supersedes | New memory replaces an older one |
source_of | Memory was derived from a note |
references | Memory mentions another memory/note |
wiki_link | Parsed from [[wiki-link]] syntax in content |
manual | Explicitly created by user or agent |
Linking During Write#
Use relatedMemoryIds when writing a memory:
{
"content": "PostgreSQL migrations must also handle index creation concurrently",
"memoryType": "constraint",
"relatedMemoryIds": [
{
"memoryId": "existing-migration-constraint-id",
"relationType": "refines"
}
]
}Wiki-Link Syntax#
Include [[Note Title]] references in memory content. ExoVault automatically parses these and creates wiki_link relations:
{
"content": "The deployment process is documented in [[Deployment Guide]]"
}Session Summary Quality#
Good Summaries#
- Describe what was accomplished (actions, not just topics)
- Note key decisions and their rationale
- Flag unresolved items
- Mention new preferences or constraints discovered
- Are concise but complete (3-5 sentences)
Summary Template#
"[What was done]. [Key decisions made]. [New information learned]. [Unresolved/next steps]."
Example:
"Refactored the authentication module to use JWT tokens instead of sessions. User decided on RS256 signing algorithm for better security. Discovered the existing user table needs a
refresh_tokencolumn. Still need to update the login endpoint and add token rotation."
Task Management#
Creating Tasks#
- Use
create_task(notwrite_memorywithmemoryType: "task") for better task metadata - Include
doneWhencriteria for clear completion conditions - Assign to a specific agent with
assignedAgentIdwhen appropriate - Use
dedup: trueto prevent duplicate tasks
Task Status Flow#
backlog → todo → in_progress → done
→ blockedRetrospective Completion#
ExoVault detects tasks that may have been completed based on recent session activity. When session_start returns tasksAutoCompleted or tasksSuggestedDone, review and confirm.
Multi-Agent Coordination#
Message Etiquette#
- Use appropriate categories:
directivefor instructions,questionfor queries,infofor updates,taskfor assignments,alertfor urgent items - Set priority accurately (1-5, where 5 is critical)
- Include a clear
subjectfor message threading - Use
parentMessageIdfor replies - Acknowledge messages with
ack_messagewhen appropriate
Shared Vaults#
When multiple agents share a vault:
- Check
recentAgentsin session_start to know who else is active - Review
changesSinceLastSessionfor updates from other agents - Use messaging for coordination rather than relying on shared memory discovery
- Be mindful of memory ownership -- prefix entities or use metadata to attribute
Related Pages#
- Memory Protocol -- When to write memories
- Session Protocol -- Session lifecycle
- Memory Types -- Type descriptions and examples
- Relation Types -- Knowledge graph relations