Documentation
¶
Overview ¶
Example: semantic_recall — automatic semantic long-term recall (WC-D-001).
What you'll learn:
- How to attach a semantic index to a memory.Manager with WithVectorIndex
- How memories written in one session are recalled by relevance in another
- How an agent auto-injects the top-k relevant memories each turn via WithMemoryRecall (default on when a MemoryManager has a vector index)
- How tenant scope keeps one user's memories from leaking to another
This example is fully OFFLINE: it ships a self-contained in-memory VectorStore (cosine similarity) and a deterministic hashing EmbeddingsProvider, so it runs with NO API key and NO network. In production, swap in the Qdrant adapter (storage/adapters/qdrant) and a real embeddings provider.
Run:
go run ./examples/semantic_recall/
Click to show internal directories.
Click to hide internal directories.