Feature deep dive
Memory Graph for AI Agents
Map wiki-links, tags, and frontmatter relations into a typed knowledge graph so your agent retrieves connected context, not isolated snippets.
Flat memory lists lose relationship context. When agents store decisions, projects, and lessons as isolated records, they cannot follow reasoning chains between related concepts.
ClawVault builds a typed knowledge graph from wiki-links, tags, and frontmatter relations in your Markdown memory files. The graph index enables traversal-based retrieval that follows connections instead of relying on keyword proximity alone.
Why teams lose context
- •Isolated memory records miss important relationships between decisions.
- •Keyword search cannot follow reasoning chains across related topics.
- •Teams re-explain connections that should already be encoded in memory.
- •Without graph structure, retrieval quality degrades as memory volume grows.
How ClawVault helps
- •Extract wiki-links, tags, and frontmatter relations into a typed graph index.
- •Traverse connections during retrieval to surface related context automatically.
- •Combine graph-aware retrieval with semantic search for high-precision recall.
- •Inspect and version the graph index alongside your memory files.
01Why graph structure improves agent memory
A knowledge graph encodes relationships that flat storage cannot represent. When an agent retrieves a decision, graph traversal surfaces the constraints, incidents, and preferences that informed it.
This matters most for complex projects where decisions interact. Graph-aware retrieval reduces the chance of recalling a conclusion without its supporting rationale.
02How ClawVault builds the memory graph
ClawVault scans your memory vault for wiki-links ([[target]]), tags, and frontmatter relations. It compiles these into a typed graph index stored at .clawvault/graph-index.json.
The graph tracks nodes (memory records) and edges (links between them), enabling traversal queries that follow relationship paths.
03Graph-aware context retrieval
Standard retrieval returns individual records. Graph-aware retrieval also pulls connected nodes — the decisions, lessons, and constraints linked to the primary result.
This produces richer context injections without requiring the agent to issue multiple search queries.
04Wiki-linking best practices
Consistent wiki-linking is the foundation of graph quality. Link decisions to their constraints, lessons to their incidents, and projects to their stakeholders.
- •Use [[decision-name]] links in memory content to create explicit edges.
- •Tag memories with consistent frontmatter categories for type-aware traversal.
- •Run clawvault link --orphans periodically to find unlinked records.
- •Treat the graph index as an engineering artifact worth reviewing.
Graph-aware retrieval vs flat memory search
Flat search finds individual records. Graph-aware retrieval follows connections to surface the full context around a topic.
| Criterion | ClawVault | Flat memory search |
|---|---|---|
| Relationship awareness | Traverses wiki-links and tags between records | Returns isolated matches without connection context |
| Context completeness | Surfaces linked decisions, constraints, and lessons | Requires multiple manual queries to build full picture |
| Scaling behavior | Graph structure improves retrieval as memory grows | Noise increases and precision drops with volume |
| Inspectability | Graph index is a local JSON file you can review | No explicit relationship model to audit |
When should I use ClawVault?
- •Use the memory graph when decisions depend on multiple related constraints and you need the full picture during retrieval.
- •Use the memory graph when your vault grows beyond simple keyword search and relationships between records become important.
- •Use the memory graph when teams need to trace how past decisions connect to current architecture.
Frequently asked questions
01What is a memory graph for AI agents?
02How does ClawVault build the knowledge graph?
03Does graph-aware retrieval replace semantic search?
04How do I maintain graph quality over time?
Related guides
Structured Graph Categories
Organize memory records into queryable category groups.
Semantic Search Memory
Combine graph traversal with meaning-based retrieval.
Persistent Memory
Build durable recall loops on top of graph-linked records.
How OpenClaw Memory Works
Technical context for memory flow and retrieval quality.