Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

namespace
string
required

The isolated namespace to search. This can be an ID for your user, a project ID, or any other identifier you wish to use to scope memories.

Maximum string length: 100
Pattern: ^[a-zA-Z0-9_:-]+$
Example:

"user_alex"

Body

application/json
query
string
required

Natural-language question, topic, or phrase to retrieve relevant context for. Replaces the v4 q field.

Minimum string length: 1
Example:

"what are the API rate limits"

filter
object

Type-safe metadata conditions applied before ranking results. Replaces the v4 filters field and unifies both legacy filter formats into one expression type.

Example:
searchMode
enum<string>
default:hybrid

Search surface. "hybrid" combines learned memories with source chunks, "memories" returns learned context, and "chunks" returns source passages.

Available options:
hybrid,
memories,
chunks
Example:

"hybrid"

limit
integer
default:10

Maximum number of results to return

Required range: 1 <= x <= 100
Example:

10

include
object

Optional context to include alongside each matching result

Example:
threshold
number
default:0.3

Minimum relevance score from 0 to 1. Raise it for precision (fewer, accurate results) or lower it for broader recall (more results).

Required range: 0 <= x <= 1
Example:

0.5

rerank
enum<string>
default:none

Post-retrieval ranking. "order" improves result ordering; "aggregate" also combines overlapping context into cleaner answers. This is helpful if you want to ensure the most relevant results are returned.

Available options:
none,
order,
aggregate
Example:

"order"

rewriteQuery
boolean
default:false

Expand and clarify the query before retrieval to improve recall for conversational or underspecified prompts. This increases the latency by about 400ms.

Example:

false

Response

Search results

results
object[]
required

Ranked memories and source chunks matching the query

searchTime
number
required

Server-side search duration in milliseconds