Skip to content

Recall

Recall uses semantic search combined with graph traversal to find relevant memories.

Query Text
[1. Generate Embedding] → 1536-dim vector (OpenAI)
[2. Vector Similarity Search] → Proximum, returns (MemoryID, distance)
[3. Fetch Full Memories] → Datahike
[4. Apply Filters] → layer, namespace, as-of
[5. Graph Expansion] → ancestors, siblings, summaries, relationships
[6. Graph Re-ranking] → memories sharing parents get a proximity bonus
[7. Generate Answer] → LLM synthesizes answer from matched memories
RecallResponse { query, answer, memories, count, usage }

Recall is a POST endpoint with a JSON body:

ParameterTypeRequiredDescription
querystringYesNatural language search query
namespacestringNoFilter by namespace
limitintNoMaximum results (default: 10)
layerstringNoFilter by semantic layer (e.g., "fact", "concept")
as-ofISO 8601NoQuery the database at a specific point in time
expand-graphboolNoInclude ancestors, summaries, siblings, and relationships

When expand-graph is true, each matched memory is enriched with its graph context:

  • Ancestors: Parent chain up to the domain level
  • Summaries: Summary nodes for the memory’s parent
  • Siblings: Other children of the same parent
  • Related: Memories connected by explicit relationships

Memories that share a parent with other matched memories receive a small distance bonus, surfacing clusters of related knowledge.

Terminal window
curl -X POST http://localhost:8080/api/v1/recall \
-H "Content-Type: application/json" \
-d '{"query": "programming language", "limit": 5, "expand-graph": true}'

Response includes ranked memories sorted by distance (lower = more similar), optional graph context, and an LLM-generated answer synthesized from the matched memories.