Migration details
v5 searches one namespace, defaults to hybrid recall, and takes every option in one typed JSON body. Search has no query-string parameters.Request mapping
With the SDK
query, searchMode, limit, threshold, filter, include, rerank, and rewriteQuery all go in one object (the JSON body over HTTP). Omitting searchMode gives hybrid.
Changed defaults
Set mode and threshold explicitly while comparing versions. After parity testing, remove them only if you want the broader v5 hybrid defaults.
Search modes
Legacy
include.chunks has no v5 equivalent. Choose chunks or hybrid instead.
Included context and ranking
include is an object of booleans in the body, e.g. "include": {"documents": true, "related": true}. Each flag defaults to false.
include.documentsadds the most relevant source document to each result.include.relatedadds parent, child, and sibling memories. Related memories come only from the same namespace and must match the request’sfilter, so they never surface content the search itself would exclude.include.forgottenlets forgotten and expired memories appear in results, including as primary results.rerankacceptsnone,order, oraggregate;rewriteQuerycontrols retrieval-oriented query rewriting.
Response mapping
Each primary result contains either
memory, chunk, or both only if the contract allows it. Branch on field presence rather than assuming one result shape.
Verification
- Compare IDs using explicit v4-equivalent defaults, then test v5 hybrid behavior separately.
- Cover all three modes, thresholds at
0and1, each rerank option, and query rewriting. - Cover every include alone and in combination, including empty results.
- Verify filters, namespace isolation, result limits, and invalid body/query placement.