Search Documentation
Search across all documentation pages
Relation Types
ExoVault's knowledge graph connects memories and notes with typed, directional relations. These relations enable multi-hop graph traversal and contextual discovery.
Available Relation Types#
wiki_link#
Direction: source references target by name
Auto-created: Yes, from [[wiki-link]] syntax in content
Wiki links are created automatically when content contains [[Note Title]] or [[Memory Reference]] syntax. They represent informal references between documents.
Memory A --wiki_link--> Note "Deployment Guide"When to use: Auto-generated from content. Agents can also create explicit wiki links for cross-references that don't use the [[]] syntax.
derived_from#
Direction: source was created based on target Graph weight: 0.9
Indicates that a memory or note was derived from another. This tracks knowledge provenance.
Fact "API uses RS256 JWT" --derived_from--> Episodic "Auth refactoring session"When to use:
- A new memory was extracted from a note
- A fact was learned during a specific session
- A skill was derived from observing a pattern
contradicts#
Direction: source conflicts with target Graph weight: 0.5
Marks conflicting information. Useful for tracking corrections and superseded knowledge.
Correction "API uses POST not GET" --contradicts--> Fact "API uses GET for search"When to use:
- A correction contradicts a previous fact
- New information conflicts with existing knowledge
- Two agents have conflicting observations
refines#
Direction: source adds detail to target Graph weight: 1.0
Indicates that a memory provides additional detail or specificity to an existing one. The highest-weighted relation for graph traversal.
Constraint "Migrations must be concurrent-safe" --refines--> Constraint "Migrations must be backward-compatible"When to use:
- Adding a specific detail to a general fact
- Narrowing a broad constraint with specific conditions
- Adding examples or edge cases to existing knowledge
part_of#
Direction: source is a component of target Graph weight: 0.9
Represents a hierarchical part-whole relationship.
Fact "Auth uses JWT" --part_of--> Fact "Auth system architecture"When to use:
- A specific detail is part of a larger concept
- A subtask is part of a larger task
- A component is part of a system
supersedes#
Direction: source replaces target Graph weight: 0.8
Indicates that a memory replaces an older, outdated one. Superseded memories are typically archived.
Fact "DB uses PostgreSQL 16" --supersedes--> Fact "DB uses PostgreSQL 15"When to use:
- Updated information replaces older information
- A corrected memory supersedes an incorrect one
- A new version replaces an old version
source_of#
Direction: source provided the content for target Graph weight: 0.7
Tracks that a note or memory was the source material for another.
Note "Architecture Doc" --source_of--> Fact "System uses microservices"When to use:
- A note was used to extract memories
- A memory references its source material
- Tracking the provenance of extracted knowledge
references#
Direction: source mentions target Graph weight: 0.7
A general reference relationship, weaker than derived_from or wiki_link. Indicates that one item mentions or is related to another.
Skill "API error handling" --references--> Fact "Error handler uses handleRouteError"When to use:
- General cross-references between related content
- When a more specific relation type does not apply
- Linking related but not directly connected knowledge
manual#
Direction: user or agent explicitly created the link Graph weight: 0.5
A catch-all relation type for links created explicitly by the user or agent where no semantic relation type fits.
Note "Meeting Notes" --manual--> Note "Action Items"When to use:
- User explicitly requests a link between items
- Organizational links that don't fit other types
- Custom categorization or grouping
Relation Types in Context#
Memory Write Relations#
When writing a memory, use relatedMemoryIds to create links:
{
"content": "PostgreSQL migrations must handle concurrent index creation",
"memoryType": "constraint",
"relatedMemoryIds": [
{
"memoryId": "existing-migration-constraint-id",
"relationType": "refines"
}
]
}The relatedMemoryIds field accepts these relation types:
derived_fromcontradictsrefinespart_ofsupersedes
Knowledge Graph Links#
The add_link route/tool accepts all relation types:
wiki_linkderived_fromcontradictsrefinespart_ofsupersedessource_ofreferencesmanual
Graph Traversal Weights#
During search_memories graph expansion, relation weights determine how much a neighbor contributes to the search score:
| Relation | Weight | Impact |
|---|---|---|
refines | 1.0 | Highest -- refinements are always relevant |
derived_from | 0.9 | High -- provenance matters |
part_of | 0.9 | High -- parts of the same concept |
supersedes | 0.8 | Strong -- replacement knowledge |
references | 0.7 | Moderate -- general references |
source_of | 0.7 | Moderate -- source material |
wiki_link | 0.6 | Moderate -- informal references |
contradicts | 0.5 | Lower -- contradictions are found but weighted less |
manual | 0.5 | Lower -- explicit but semantically generic |
Link Properties#
Each link in the knowledge graph has:
| Property | Description |
|---|---|
id | Unique link identifier |
userId | Owner user ID |
sourceType | "note" or "memory" |
sourceId | UUID of the source node |
targetType | "note" or "memory" |
targetId | UUID of the target node |
relationType | One of the relation types above |
encryptedLabel | Optional encrypted label for the link |
labelIv | IV for the encrypted label |
createdBy | "agent", "user", or "system" |
Related Pages#
- Memory Types -- Memory type descriptions
- Agent Routes -- add-link, get-links, explore-graph API
- Best Practices -- Linking guidelines
- Memory Protocol -- When to create links