recall()
Searches across all three memory layers simultaneously and returns a ranked list of results.How scores are computed
Each result carries a composite score fused from three signals:
Weights are configurable via
MemoryConfig or env vars:
Filtering by layer
RecallResult fields
RankedMemory fields
context_for()
Builds a token-budgeted string ready to inject into a prompt. Internally callsrecall() with top_k=50, then fills the budget with the highest-scoring results.
ContextResult fields
Token budget
The default token budget comes fromMemoryConfig.default_token_budget (default: 2048). Override per-call:
Embedding model
By default, plyra-memory usesall-MiniLM-L6-v2 from sentence-transformers (384-dimensional embeddings, runs locally).