What you are going to build
Mem0 is a memory layer for an assistant. It reads a conversation, decides what is worth keeping, stores it, and finds it again next time the same person turns up. This course builds that for one support assistant, and every lesson runs on your machine with no API key.
An assistant without memory meets every customer for the first time, every time. They tell it their delivery address on Monday and it asks again on Tuesday. Mem0 is the piece that fixes that, and it is a small library with a large amount of behaviour hidden inside two method calls.
Memory, working
from pretend_mem0 import memory
shop = memory()
shop.add("I prefer email updates, not SMS. Deliver to my office.", user_id="ravi")
for hit in shop.search("email updates", filters={"user_id": "ravi"})["results"]:
print(round(hit["score"], 2), hit["memory"])One sentence went in and came back as separate memories, scored against a question. Nobody wrote a database schema and nobody called an API.
pretend_mem0 is a stand-in model and a stand-in embedder that you write in lessons 5 and 6. Mem0 needs a model to decide what is worth remembering and an embedder to search; by default both are OpenAI, and the stand-ins make the whole course free to run.
No API key, and no downloads either
Other offline Mem0 guides exist, and every one of them asks you to install Ollama, pull a model of several gigabytes, and run a vector database in Docker before lesson one. This course asks for none of that. The model and the embedder are about forty lines of Python between them, and the store runs inside the process.
Lesson 19 shows the two lines that swap in a real model, and says plainly what changes when you do.
What you will have built
| Piece | What it does | Lesson |
|---|---|---|
| A stand-in model | Decides what is worth keeping, with no key | 5 |
| A stand-in embedder | Turns text into a vector so search works | 6 |
| add and search | The two calls that do nearly everything | 8 and 9 |
| Identifiers | Whose memory this is: user, agent, run | 12 |
| Metadata | Tags you can filter on later | 13 |
| update, delete, history | Memories change, and you can see how | 15 and 16 |
| Custom instructions | Steering what gets kept | 17 |
| A tested assistant | Memory in the reply loop, with evals | 21 to 23 |
What you need
- Python 3.10 or newer.
pip install mem0ai langchain langchain-core. Lesson 3 explains why the langchain packages are there.- No account, no key, no card, no Docker.
- Read the table above and pick the row you most want. That is the lesson to look forward to.
- Think of one thing your own assistant asks users twice. That is what this course is for.
Every expert started right here.