Why vector search alone isn’t enough
Pure vector search finds memories that are semantically similar to the query. But relevant memories aren’t always semantically close to the query string. Consider: “What does this user do for work?” If the agent has:- Memory A: “User is a software engineer” (high similarity to query)
- Memory B: “User’s company was acquired by Stripe last month” (low similarity to query — mentions company/Stripe, not “work”)
- Memory C: “User’s team uses Go for all backend services” (medium similarity)
Graph structure
Every memory is a node. Edges are created between memories with typed relationships:| Relationship Type | Decay Multiplier | Example |
|---|---|---|
entity_link | 0.98 | Both mention “Alice” |
causal | 0.97 | A caused B |
temporal | 0.97 | A happened before B |
thematic | 0.95 | Same topic cluster |
contradicts | 0.95 | A and B conflict |
supports | 0.96 | A reinforces B |
derived_from | 0.96 | B was inferred from A |
supersedes | 0.94 | B replaces A |
contradicts edges decay slowly (0.95) — the system must remember which beliefs conflict.
Hybrid recall
Every recall query uses a weighted combination:Controlling the blend
Embedding-only mode
WhenLLM_PROVIDER=none, entity extraction and relationship detection are disabled. The graph still exists and thematic links (clustering by embedding similarity) are still created — but entity and causal edges are not.
In practice, the thematic link graph is sufficient for most use cases. The additional entity/causal edges add richest context for complex multi-entity queries.