Namespaces
Organize memories into isolated spaces by user, project, or workspace
Metadata filtering
Query memories by custom properties like category, status, or date
Namespaces
Namespaces create isolated memory spaces. Use them to separate memories by user, project, or any logical boundary. The namespace is part of the URL (/ns/{namespace}/...), so every SDK call takes it as a top-level key.
Adding Memories to a Namespace
Searching a Namespace
Each search is scoped to a single namespace. Passing
namespace: "user_123" restricts results to memories stored in that namespace.Recommended patterns
More Namespace Examples
More Namespace Examples
add, search, list, profile, documents.*). There is no array form; one request touches one namespace.Metadata
Metadata lets you attach custom properties to memories and filter by them later.Adding memories with metadata
Searching with a Filter
A filter is a typed expression. One condition is an object withfield, operator, and value. Several conditions are combined with an and or or node that lists them in operands:
Operators
String conditions accept an optional
caseSensitive boolean. Numeric values are JSON numbers, not numeric strings.
Combining filters
Nestand and or nodes for complex queries:
Excluding results
Use the negative operators (neq, notContains, arrayNotContains) to exclude matches:
More Metadata Filter Examples
More Metadata Filter Examples
Substring match, case-insensitive:Numeric comparisons:Array membership:Complex nested filters:
Real-world patterns
Real-world patterns
User’s work documents from 2024:Team meeting notes with specific participants:Exclude drafts and deprecated content:
Filters Beyond Search
The samefilter expression works on list and profile calls:
Quick reference
When adding memories
When searching
Metadata key rules
- Allowed characters:
a-z,A-Z,0-9,_,-,. - Max length: 64 characters
- No spaces or special characters
- Keys are literal:
customer.planis one key namedcustomer.plan, not a nested path
Query complexity limits
- Maximum 5 levels of nested
and/orexpressions - Maximum 200 operands per logical group
If you need more conditions than these limits allow, break your query into multiple requests or use broader search terms with post-processing.
Reading One Document’s Chunks
Scoping a search to a single document (docId) is not part of v5. To work with the chunks of one long document, fetch the document with its chunks attached:
Next steps
Search
Apply filters in search queries
Add Memories
Add content with namespaces and metadata