Prerequisites
- Python 3.11 or later
- Docker (used to run the Postgres + pgvector container in step 1)
1
Start a Postgres instance
Pull and run the official The container listens on port 5432 and creates a default
pgvector image:postgres database. The --rm flag removes the container automatically when you stop it.2
Install the SDK
3
Set the connection URL
PG_URL from the environment when you pass it as the url argument, or you can supply the string directly in code.4
Run your first memory operations
Save the following as Each call goes through the same
quickstart.py and run it with python quickstart.py:Memory facade. Swapping the provider= argument is the only change needed to point the same code at a different backend.5
Verify provider capabilities
Add this at the end of the script to inspect what the backend supports:The
capabilities() call is cached per Memory instance — it only hits the backend once. Use it to degrade gracefully when a feature is not available on your chosen provider.What’s next
- Memory model — understand the fields on a memory record, how scopes work, and what a context block contains.
- Switch providers — use the same code against Mem0, Supermemory, or Letta with one line changed.
- LLM integration — inject
ctx.textinto an OpenAI or Anthropic prompt.