namespace (what v3/v4 called a container tag).
SDKs: one call,
supermemory.search(namespace, { query, searchMode }) in TypeScript or client.search(namespace, query=..., search_mode=...) in Python. searchMode ("memories", "chunks", or "hybrid") picks what comes back.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. Branch on field presence.Parameters
namespace is the URL path. Every other option goes in the JSON body: the second argument in TypeScript, or keyword arguments in Python. Search takes no query-string parameters; sending any returns 400.
Defaults changed from v4:
searchMode was memories and is now hybrid; threshold was 0.6 and is now 0.3. Set both explicitly if you are comparing against v4 results.Search modes
hybrid(default, recommended) — Searches both memories and document chunks, and returns both in the responsememories— Only searches extracted memorieschunks— Only searches raw document/chunk content, skipping extracted memories
Filtering
Thenamespace scopes results to a user or project. Use filter for metadata-based filtering inside that namespace:
Filter Types
Filter Types
- Equality:
{ field: "status", operator: "eq", value: "active" }(alsoneq; strings, numbers, booleans) - String contains:
{ field: "title", operator: "contains", value: "react" }(alsonotContains; optionalcaseSensitive) - Numeric:
{ field: "priority", operator: "gte", value: 5 }(gt,gte,lt,lte) - Array contains:
{ field: "tags", operator: "arrayContains", value: "important" }(alsoarrayNotContains) - Logic:
{ operator: "and" | "or", operands: [...] }, nested up to 5 levels
customer.plan is one field name, not a nested path. See Organizing & Filtering for full syntax.Query optimization
Reranking
Re-scores results for better relevance. Adds ~100ms latency.Threshold
Control result quality vs quantity:Attachments
include.documentsadds the most recently updated source document to each result when one is available.include.relatedadds parent, child, and sibling memories (see graph memory).include.forgottenlets forgotten and expired memories appear in results. By default, search excludes memories that have been forgotten or have passed theirforgetAfterexpiration.
result.included (included.document, included.related.{parents,children,siblings}).
Chatbot example
Optimal configuration for conversational AI:Response schema
Response schema
Next steps
- Ingesting Content — Add content to search
- User Profiles — Get user context
- Organizing & Filtering — Namespaces and metadata