How it works
Most memory solutions store a flat list of strings and retrieve them by cosine similarity. MemWire instead builds a graph of token-level nodes where edges encode semantic displacement relationships between tokens across memories. When you add a message, the pipeline:- Tokenises the content
- Embeds each token both in isolation and in context
- Computes a displacement vector which is the difference between a token’s isolated embedding and its contextual one
- Creates graph nodes for each token and connects pairs whose displacement vectors are similar above a threshold
- Cross-links nodes from the new memory to nodes from recent memories
What you get
- Multi-hop recall — a query about “my project deadline” can surface memories about “I work in software” and “I prefer async communication” via shared graph paths
- Deduplication — tokens above
node_merge_similarityare merged into the same node, so repeated concepts accumulate strength rather than bloating the graph - Path scoring — paths are ranked by the geometric mean of edge weights and node similarities, then pruned to
recall_max_paths - Formatted context —
result.formattedgives you a ready-to-inject string for your LLM prompt
Code example
Recall result structure
TheRecallResult object contains:

