Skip to main content
POST
cURL
Relevance-ranked hybrid search across stored memories. V3 uses multi-signal retrieval: semantic, BM25 keyword, and entity matching scored in parallel and fused. The returned score is a combined [0, 1] value. Entity IDs (user_id, agent_id, app_id, run_id) must be passed inside the filters object: top-level entity IDs are rejected with 400. At least one entity ID is required. Expired memories are hidden by default. Pass show_expired: true to include memories whose expiration_date has passed. Python uses show_expired; TypeScript uses showExpired. The filters object supports complex logical operations (AND, OR, NOT) and comparison operators:
  • in: Matches any of the values specified
  • gte: Greater than or equal to
  • lte: Less than or equal to
  • gt: Greater than
  • lt: Less than
  • ne: Not equal to
  • icontains: Case-insensitive containment check
  • *: Wildcard character that matches everything

Search parameter defaults

ParameterDefault
top_k10 (range 1–1000)
threshold0.1 (pass 0.0 to disable)
rerankfalse (pass true to enable)

Body

application/json
query
string
required

Natural-language search query.

Minimum string length: 1
filters
object
required

Entity and metadata filters. Must include at least one entity ID (user_id, agent_id, app_id, or run_id). Supports AND, OR, NOT, and comparison operators (in, gte, lte, gt, lt, contains, icontains, ne).

show_expired
boolean
default:false

When true, include memories whose expiration_date has passed. Expired memories are hidden by default.

top_k
integer
default:10

Number of results to return.

Required range: 1 <= x <= 1000
threshold
number
default:0.1

Minimum semantic relevance score. Pass 0.0 to disable filtering.

Required range: 0 <= x <= 1
rerank
boolean
default:false

Apply the managed reranker for better ordering (adds latency).

reference_date

Optional query anchor time for relative temporal interpretation. Accepts Unix epoch, YYYY-MM-DD, or ISO datetime.

Response

Ranked search results.

results
object[]
required