In short.
Mem0’s Search Memory guide helps developers retrieve saved context for AI agents, but inconsistencies in its examples leave some filter syntax and response details unresolved. It covers hosted and open-source Python and JavaScript usage, user scoping, top_k and threshold controls, optional reranking and open-source score explanations. It is useful for understanding the retrieval operation and comparing implementation choices. Complete installation requirements, costs, licensing and measured retrieval quality are not established by this page. None of the examples was executed.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete selected Search Memory page at [https://docs.mem0.ai/core-concepts/memory-operations/search], including both language examples, the Platform/OSS comparison, v3 and user-scoping notices, filter patterns, tuning advice and score explanations. Linked API, setup, pricing, Temporal Reasoning, Advanced Retrieval, MCP, repository and cookbook pages are excluded. No code or API call was executed; setup success, actual response structure, isolation and retrieval quality remain untested.
The overview
Identity
Search Memory is a Mem0 documentation guide to retrieving previously stored memories through natural-language queries. It covers the hosted Mem0 Platform and the open-source SDK, with separate Python and JavaScript examples. The resource is the guide at [https://docs.mem0.ai/core-concepts/memory-operations/search].
Assessment
The guide connects an accessible explanation of semantic search with concrete SDK calls and a Platform/OSS comparison. Its most useful details concern where entity identifiers belong, which retrieval controls are available and how to inspect OSS ranking scores.
Its examples need checking against the intended SDK release because the page contains conflicting field names, category-filter guidance and response descriptions. Claims that query processing or reranking improve relevance are not accompanied by measured results.
Users
The guide suits developers building assistants or agents that recall preferences, interaction history or session context. Beginners receive definitions of queries, filters, result limits and reranking. Experienced developers receive implementation comparisons, v3 compatibility warnings and optional ranking diagnostics.
Readers need enough Python or JavaScript knowledge to integrate an SDK. Building a complete assistant and configuring its memory storage require additional documentation.
Capabilities
The page documents natural-language retrieval, filtering by user and session identifiers, result-count control through top_k, relevance cutoffs through threshold and optional reranking. Platform filters support AND, OR and comparison operators; OSS is described as providing basic field filters with extension through Python hooks. Platform has managed reranker options, while OSS requires configuring a local or third-party reranker.
For OSS, enabling explain adds score_details containing semantic similarity, normalized BM25 keyword scoring, an entity boost, raw combined score, maximum possible score, final score and filtering threshold. The field is omitted when explanation is disabled.
Using it
Requirements
The hosted examples use MemoryClient and a Mem0 API key. The OSS examples use Memory. Useful retrieval requires previously stored memories associated with the identifiers being searched.
The page does not establish installation commands, supported Python or JavaScript runtime versions, exact SDK releases, default embedding providers or complete database configuration. Reranking requires a configured reranker; the page states that rerank defaults to False.
Mechanism
The documented process prepares a natural-language query, converts it into an embedding—a numerical representation used to compare meaning—and searches stored embeddings using cosine similarity. Filters restrict candidates, while thresholds and optional reranking refine the returned results. The OSS explanation also describes optional keyword and entity signals.
A separate note says Platform v3 uses Temporal Reasoning internally for time-aware queries while preserving the usual search response shape. This page does not explain that mechanism further.
Setup
The Python examples import MemoryClient or Memory from mem0. JavaScript imports MemoryClient from mem0ai and Memory from mem0ai/oss. Hosted usage constructs a client with an API key; OSS usage constructs a Memory instance before calling search.
In both the Platform and OSS examples, user_id, agent_id and run_id go inside filters. The page states that in v3, passing user_id as a top-level argument to the OSS SDK raises ValueError. These snippets demonstrate client usage; the surrounding environment and provider setup remain unspecified.
Example
The guide’s simplest Python pattern is client.search("What are Alice's hobbies?", filters={"user_id": "alice"}) for Platform, or the equivalent m.search call for OSS. It asks for stored context associated with Alice; it does not itself generate an answer or add memories.
A more specific session example combines user_id="alice", agent_id="chatbot" and run_id="session-123". Platform expresses this with AND; OSS places the fields together in filters. No actual returned memories or executed results are supplied.
Assessment & evidence
Limitations
The OSS JavaScript examples alternate between userId and user_id. A later category example is labelled Platform-only even though earlier OSS examples use categories with contains. The prose describes an array of documents, while explanation examples access a results property containing the documents. The page does not resolve these differences. The OSS JavaScript examples are also inconsistent about await. The simple searches call memory.search without await, while the explain example and the Platform JavaScript example use await.
The Platform Python example joins Alice’s user filter and named-agent filters with OR. As a logical interpretation of that expression, matching an agent branch does not also require matching Alice. This makes it a poor template for mandatory single-user scoping without further restriction; actual authorization and isolation behavior were not assessed.
Reasoning
The documented controls address different concerns: identity and session filters define the eligible memories, top_k controls quantity, threshold controls the relevance cutoff and reranking revisits ordering. Their practical tradeoffs need evaluation with representative queries because the guide supplies no precision, recall or latency measurements.
The page lists fact checking as a use case. Retrieving a stored memory does not establish that its content is accurate or current; the guide provides no evidence of independent truth verification.
Alternatives
Within Mem0, the guide contrasts Platform’s managed reranking and richer filter syntax with OSS configuration of storage-dependent responses and rerankers. This supports comparing integration requirements, but supplies no measurements establishing which performs better.
The page also names Mem0 MCP as an interface through which agents can search memories proactively [https://docs.mem0.ai/platform/mem0-mcp]. Its setup and permissions are not established here. No competing memory systems are substantively compared.
Evidence
The evidence is Mem0’s own Search Memory documentation [https://docs.mem0.ai/core-concepts/memory-operations/search]. It contains conceptual explanations, a comparison table, Python and JavaScript snippets, filter examples and compatibility notices. These support statements about documented usage, rather than independently verified implementation behavior.
No SDK execution, API responses, benchmark results or independent implementation inspection are available. Linked documentation and repository contents are outside the evidence.
Access & freshness
Costs
The page provides no prices, free allowances, request limits or billing rules. Hosted search costs and any charges for embeddings, reranking or storage are unknown. The open-source label does not establish the operating cost of a configured deployment.
Rights
The page identifies an open-source implementation and links to its documentation source on GitHub, but includes no license text or explicit reuse grant for the guide or its examples. Applicable commercial-use, modification and redistribution terms are unknown from this page.
Freshness
The page metadata reports a modification date of 2026-07-06, and the supplied capture is dated 2026-11-15. The text explicitly discusses Platform v3 and a v3 OSS change requiring entity identifiers inside filters.
No exact SDK package version or release pin accompanies the examples. Compatibility with a particular installed release, and changes after the capture, are unknown.
Actions
Before integrating, choose Platform or OSS and confirm the matching SDK’s filter names, category support, asynchronous usage and response structure. The guide points to the search API reference for full parameter details [https://docs.mem0.ai/api-reference/memory/search-memories]. Keep the intended user restriction mandatory when combining conditions.
For an initial implementation, use a simple user-scoped query against known sample memories and check both expected matches and empty results. For OSS tuning, inspect score_details with explain enabled. Evaluate top_k, threshold and configured reranking against application-specific expectations before assuming improved relevance.
