Search memory entries
Search memory entries - Low latency for conversational
ParametersExpand Collapse
body: SearchMemoriesParams { q, aggregate, containerTag, 8 more }
If true, aggregates information from multiple memories to create new synthesized memories. The result will be a mix of aggregated and non-aggregated memories, reranked by relevance to the query. Works in conjunction with reranking.
Optional tag this search should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to filter memories.
Filter search results by filepath. Exact match for full paths, prefix match if ending with /
filters?: Or { OR } | And { AND } Optional filters to apply to the search. Can be a JSON string or Query object.
Optional filters to apply to the search. Can be a JSON string or Query object.
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >Array of OR filter expressions
Array of OR filter expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >Array of AND filter expressions
Array of AND filter expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
OR: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >OR: Array of conditions or nested expressions
OR: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
And { AND }
AND: Array<UnionMember0 { key, value, filterType, 3 more } | Or { OR } | And { AND } >AND: Array of conditions or nested expressions
AND: Array of conditions or nested expressions
UnionMember0 { key, value, filterType, 3 more } A single filter condition based on metadata, numeric values, array contents, or string matching
A single filter condition based on metadata, numeric values, array contents, or string matching
Or { OR }
DEPRECATED: Use searchMode=‘hybrid’ instead. If true, automatically switches to hybrid mode. This field is kept for backward compatibility only.
If true, rerank the results based on the query. This is helpful if you want to ensure the most relevant results are returned.
If true, rewrites the query to make it easier to find documents. This increases the latency by about 400ms
ReturnsExpand Collapse
SearchMemoriesResponse { results, timing, total }
results: Array<Result>Array of matching memory entries and chunks with similarity scores. Contains memory results when searchMode=‘memories’, both memory and chunk results when searchMode=‘hybrid’, or only chunk results when searchMode=‘documents’. Memory results have ‘memory’ field, chunk results have ‘chunk’ field. BACKWARD COMPATIBILITY: When using deprecated include.chunks=true, only memory results are returned with chunks embedded in them (old format).
Array of matching memory entries and chunks with similarity scores. Contains memory results when searchMode=‘memories’, both memory and chunk results when searchMode=‘hybrid’, or only chunk results when searchMode=‘documents’. Memory results have ‘memory’ field, chunk results have ‘chunk’ field. BACKWARD COMPATIBILITY: When using deprecated include.chunks=true, only memory results are returned with chunks embedded in them (old format).
context?: Context { children, parents, related } Object containing version history (parents/children via updates) and related memories (extends/derives)
Object containing version history (parents/children via updates) and related memories (extends/derives)
Search memory entries
import Supermemory from 'supermemory';
const client = new Supermemory({
apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted
});
const response = await client.search.memories({ q: 'what are the API rate limits' });
console.log(response.results);{
"results": [
{
"id": "mem_abc123",
"metadata": {
"source": "bar",
"confidence": "bar"
},
"similarity": 0.89,
"updatedAt": "updatedAt",
"chunk": "This is a chunk of content from a document...",
"chunks": [
{
"content": "This is a chunk of content from the document...",
"documentId": "doc_xyz789",
"position": 0,
"score": 0.85
}
],
"context": {
"children": [
{
"memory": "Later version: API rate limit increased to 100 req/min on the free tier.",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": 1
}
],
"parents": [
{
"memory": "Earlier version: API rate limit is 50 req/min on the free tier.",
"relation": "updates",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": -1
}
],
"related": [
{
"memory": "memory",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
}
}
]
},
"documents": [
{
"id": "doc_xyz789",
"createdAt": "createdAt",
"updatedAt": "updatedAt",
"metadata": {
"source": "bar",
"language": "bar"
},
"summary": "API rate limit policy: 100 req/min free, 1000 req/min pro.",
"title": "API Rate Limiting Policy",
"type": "web"
}
],
"filepath": "filepath",
"isAggregated": false,
"memory": "The user prefers detailed API responses over minimal ones.",
"version": 3
}
],
"timing": 245,
"total": 5
}Returns Examples
{
"results": [
{
"id": "mem_abc123",
"metadata": {
"source": "bar",
"confidence": "bar"
},
"similarity": 0.89,
"updatedAt": "updatedAt",
"chunk": "This is a chunk of content from a document...",
"chunks": [
{
"content": "This is a chunk of content from the document...",
"documentId": "doc_xyz789",
"position": 0,
"score": 0.85
}
],
"context": {
"children": [
{
"memory": "Later version: API rate limit increased to 100 req/min on the free tier.",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": 1
}
],
"parents": [
{
"memory": "Earlier version: API rate limit is 50 req/min on the free tier.",
"relation": "updates",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": -1
}
],
"related": [
{
"memory": "memory",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
}
}
]
},
"documents": [
{
"id": "doc_xyz789",
"createdAt": "createdAt",
"updatedAt": "updatedAt",
"metadata": {
"source": "bar",
"language": "bar"
},
"summary": "API rate limit policy: 100 req/min free, 1000 req/min pro.",
"title": "API Rate Limiting Policy",
"type": "web"
}
],
"filepath": "filepath",
"isAggregated": false,
"memory": "The user prefers detailed API responses over minimal ones.",
"version": 3
}
],
"timing": 245,
"total": 5
}