Skip to main content
In about five minutes you will get an API key, store your first memory, and search it back. Follow along in Python, JavaScript, cURL, or the terminal.
Are you an AI agent? See Sign up as an agent: create a working API key in four commands, with no email or dashboard.

Prerequisites

Store your first memory

1

Install

Pick a tab and use the same one for every step below.
2

Set your API key

3

Add a memory

Mem0 pulls the individual facts out of the conversation and stores each one separately:
4

Search memories

Both facts come back, ranked by how well they match the question:
Pass these memories to your model as context, and it answers with what it already knows about the user instead of asking again.
Rather than calling add and search yourself, you can hand Mem0 to your agent as a set of tools and let it decide when to save and look things up. See Mem0 MCP.

What’s next?

You stored and searched your first memory. Start with scoping, since every call you make from here needs it:

Scope memories to users and agents

What user_id actually does, plus the agent_id, app_id, and run_id fields that came back empty above.

How Mem0 works

Why one sentence became two memories, and how Mem0 decides what to keep.

Update and delete memories

The operations beyond add and search, for when stored facts change or go stale.

Use Mem0 with your agent framework

Wire memory into LangChain, CrewAI, LangGraph, or the OpenAI Agents SDK.
Something not working? The FAQs and troubleshooting page covers the common setup errors.