namespace (what v3/v4 called a container tag).
TypeScript SDK: one call,
supermemory.search(namespace, { query, searchMode }). searchMode ("memories", "chunks", or "hybrid") picks what comes back. There is no v5 Python SDK yet; the Python tab shows the legacy client.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 the SDKs).
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
attach.documentsadds the most relevant source document to each result.attach.relatedadds parent, child, and sibling memories (see graph memory).attach.forgottenallows forgotten memories in related context. 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