Skip to main content
Get started with Mem0’s Python SDK in under 5 minutes. This guide shows you how to install Mem0 and store your first memory.

Prerequisites

Set your OpenAI API key:
Uses OpenAI by default. Want to use Ollama, Anthropic, or local models? See Configuration.

Installation

1

Install via pip

2

Initialize Memory

3

Add a memory

4

Search memories

Output:
Using Mem0? Star us on GitHub to help more developers discover memory for AI apps.
By default Memory() wires up:
  • OpenAI gpt-5-mini for fact extraction and updates
  • OpenAI text-embedding-3-small embeddings (1536 dimensions)
  • Qdrant vector store with on-disk data at /tmp/qdrant
  • SQLite history at ~/.mem0/history.db
  • No reranker (add one in the config when you need it)

What’s next?

Memory operations

Search, update, and manage memories with the full CRUD API.

Configure for production

Swap in your own LLM, embedder, and vector store.

Add to your framework

Wire Mem0 into LangChain, CrewAI, LangGraph, and 20+ more.
If you have any questions, please feel free to reach out:

Discord

Join our community

GitHub

Ask questions on GitHub

Support

Talk to founders