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
- TypeScript
- Python
- cURL
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 responsememories— Only searches extracted memoriesdocuments— Only searches raw document/chunk content, skipping extracted memories
Filtering
Filter bycontainerTag to scope results to a user or project:
filters for metadata-based filtering:
Filter Types
Filter Types
- 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 }
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 theirforgetAfter expiration. Set include.forgottenMemories to true to recover them:
Chatbot Example
Optimal configuration for conversational AI:Response Schema
Response Schema
Next Steps
- Ingesting Content — Add content to search
- User Profiles — Get user context with search
- Organizing & Filtering — Container tags and metadata