Skip to main content
POST
Recall Memories
This endpoint requires an x402 payment header.
Price: $0.005 USDC

Request Body

string
required
Natural language search query. Max 32,768 characters.
integer
Maximum number of results, 1–100. Default: 5.
number
Minimum similarity threshold, 0–1. Default: 0.0.
string
Filter results to a specific namespace.
string
Filter results to a specific session.
string
Filter results to a specific agent.
boolean
Include related memories in results. Default: false.
object
Additional filters to narrow results.

Scoring

Hybrid recall scoring (4-signal approach):
Signals:
  • vector_sim: Cosine similarity (0–1) — primary semantic signal
  • keyword_match: Full-text/BM25 match, normalized (0–1) — exact term matches
  • recency: exp(-age_days / 30) — temporal freshness
  • context_importance: Importance dynamically boosted by query relevance
  • access_boost: min(1 + access_count × 0.1, 2.0) — frequently recalled memories rank higher
  • type_decay: Exponential decay based on memory type half-life (correction: 180d, preference: 180d, decision: 90d, project: 30d, observation: 14d, general: 60d). Pinned memories are exempt from decay. Memories with more relations decay slower.
When keyword match is strong (>0.3), its weight increases to 0.35 (vector drops to 0.45) for adaptive boosting.

Response (200)

array
Array of matching memories.
number
Tokens used for the query embedding.

Example

Response