Mem0 AI Tools
AI-generatedSummary
Search memories using semantic similarity and return the results to an AI agent.
Inputs
- authType — Authentication method: 'cloud' for Mem0.ai or 'selfHosted' for self‑hosted instance.
- userId — Default user ID for scoping memory operations.
- agentId — Optional agent ID to scope memories to a specific agent.
- runId — Optional run/session ID to scope memories to a specific session.
- enabledTools — List of Mem0 tools to expose (e.g., search, add, getAll, delete, history).
- toolDescription — Human‑readable description of the tool for the AI agent.
- searchOptions — Additional options for the search tool, such as topK and rerank.
Output shape
object with properties 'message' (string) and 'enabledTools' (array of strings) emitted on the 'ai_tool' output.
The object represents the node's output when triggered directly (non‑AI‑agent mode). When used in an AI Agent workflow the returned tool objects are passed to the agent; no additional pagination or error envelope is added.
Examples
Example 1: Search memories for a user using cloud auth, limiting results to 7 items.
{"authType":"cloud","userId":"user_123","enabledTools":["search"],"searchOptions":{"topK":7}}
Example 2: Add a new memory in a self‑hosted instance and retrieve all memories.
{"authType":"selfHosted","enabledTools":["add","getAll"],"toolDescription":"Store conversation turns and retrieve them."}