Skip to main content
Search through your memories and documents with a single API call.
Use searchMode: "hybrid" for best results. It searches both memories and document chunks, returning the most relevant content.
TypeScript SDK: call client.search({ q, searchMode }) directly — searchMode ("memories", "documents", or "hybrid") picks what comes back. client.search.memories() and client.search.documents() still work but are deprecated; no migration is required, just use client.search() going forward. The Python SDK is unaffected — client.search.memories() remains the call there.

Quick Start

Response:
In hybrid mode, results contain either a memory field (extracted facts) or a chunk field (document content), depending on the source.

Parameters

Search Modes

  • hybrid (recommended) — Searches both memories and document chunks, and returns both in the response
  • memories — Only searches extracted memories
  • documents — Only searches raw document/chunk content, skipping extracted memories

Filtering

Filter by containerTag to scope results to a user or project:
Use filters for metadata-based filtering:
  • String equality: { key: "status", value: "active" }
  • String contains: { filterType: "string_contains", key: "title", value: "react" }
  • Numeric: { filterType: "numeric", key: "priority", value: "5", numericOperator: ">=" }
  • Array contains: { filterType: "array_contains", key: "tags", value: "important" }
  • Negate: { key: "status", value: "draft", negate: true }
See Organizing & Filtering for full syntax.

Query Optimization

Reranking

Re-scores results for better relevance. Adds ~100ms latency.

Threshold

Control result quality vs quantity:

Including Forgotten Memories

By default, search excludes memories that have been forgotten or have passed their forgetAfter expiration. Set include.forgottenMemories to true to recover them:

Chatbot Example

Optimal configuration for conversational AI:

Next Steps