Actions24
- Memory Actions
- Entity Actions
- Organization Actions
- Project Actions
Memory → Semantic Search
AI-generatedSummary
Post a semantic search query to Mem0's v1 endpoint, returning memories with similar meaning. Optional parameters allow filtering by user, agent, application, or session, and configuring result count, reranking, and returned fields.
Inputs
- authType — Choose between Mem0 cloud or self-hosted instance.
- query (required) — Text for semantic search in memories. Mem0 finds memories with similar meaning, not just exact matches.
- userId — Unique user identifier to associate with the memory. Used to filter and organize memories by user.
- agentId — Identifier of the AI agent/assistant that is interacting. Useful for separating memories by different agents.
- appId — Application or system context identifier. Use to segment memories by different apps.
- runId — Identifier of the current session/run. Groups memories from the same conversation or interaction.
- options — Search configuration. topK controls maximum results returned; rerank enables intelligent reranking for relevance; fields specifies comma-separated list of response fields to include; metadata filters memories by specific key-value pairs.
- options.topK — Maximum number of memories to return in search results (default: 10).
- options.rerank — Enable intelligent reranking of results to improve relevance.
- options.fields — List of specific fields to include in the response, separated by comma (e.g., id,memory,metadata,created_at).
- options.metadata — Filter to search only memories with specific metadata, provided as fixed collection entries of key-value pairs.
Output shape
array of objects
Each object represents a memory record returned from the Mem0 API. Field names and availability depend on the search version (v1) and the
options.fieldsselection. If no fields filter is applied, the full memory object is returned.
Examples
Example 1: Search user memories for preferences
authType: cloud; query: user interface preferences; userId: user_123; options.topK: 5; options.rerank: true