Mem0 v2.2.1
Mem0 v2.2.1 stops reporting memories it never stored
add() now returns only what the vector store accepted.
docs/changelog/sdk.mdx
In this Mem0 release, the add call changes what it reports. Until now, a record the vector store rejected still came back as a successful add event, although it was never stored.
What add() returns
01: What add() returns
mem0/memory/main.py
What the add call returns.
Only inserted records count
Only records the store inserted reach history and the result
- written to history
- linked to entities
- returned to your code
Now only the records the vector store actually inserted count. Those are the ones written to history, linked to entities, and returned to your code, in both Memory and AsyncMemory.
VectorStoreError
When nothing could be stored, add() raises an error
VectorStoreErrorIf none of the extracted memories could be inserted, the add call now raises a VectorStoreError. Before, it returned those memories anyway, so your code carried on as if they were saved.
Context manager is back
with Memory() as m: works again
The instance closes when the block exits.
with Memory() as m:
...
async with AsyncMemory() as m:
...The context manager protocol is back on Memory and AsyncMemory. Open one in a with block, or an async with block, and the instance closes itself when the block exits.
Vector store search
02: Vector store search
docs/changelog/sdk.mdx
Vector store search.
Turbopuffer filters
Turbopuffer filters now apply every operator
In the Python and the TypeScript SDK.
Before, eq, ne, in and nin were dropped and the query ran unfiltered.
Turbopuffer filters now apply every operator, in both the Python and TypeScript SDKs. Before, only the range operators were read. Equals, not equals, in and not in were dropped silently, and the query came back unfiltered.
Turbopuffer scores
Turbopuffer ranks euclidean_squared results in the right order
1 - distance, negative above 1, ranking inverted1 / (1 + distance)Turbopuffer search scores now respect the distance metric. With squared euclidean distance, the old score went negative for any distance above one, which turned the ranking upside down. Now it stays between zero and one.
S3 Vectors scores
S3 Vectors scores stop collapsing to zero
max(0, 1 - distance), most scores 01 / (1 + distance)S3 Vectors search scores are now metric-aware. With euclidean distance, the old formula collapsed most scores to zero. Now every distance maps to its own score, and a closer match always scores higher.
Models and providers
03: Models and providers
docs/changelog/sdk.mdx
Models and providers.
Bedrock reasoning models
Claude reasoning models on Bedrock stop failing with a KeyError
content[0], a reasoningContent blockOn AWS Bedrock, Claude reasoning models can send a reasoning block before the text. Mem0 used to take only the first block and fail with a key error. Now it returns the first block that carries text.
Provider defaults
A DeepSeek or xAI config stays pointed at DeepSeek or xAI
OpenAI's default baseURL and model now apply only to OpenAI.
DEEPSEEK_API_BASE, XAI_API_BASEIn the TypeScript SDK, a DeepSeek or xAI config without its own base URL or model used to point at OpenAI, with an OpenAI model name. Now it falls back to that provider's own defaults.
Installing from npm
04: Installing from npm
mem0-ts/package.json
Installing from npm.
pg is optional
npm install mem0ai no longer pulls in pg
pg, @types/pg and natural are optional peer dependencies.
pg pinned at exactly 8.11.3Installing mem0ai from npm no longer pulls in the Postgres driver. It's an optional peer dependency now, with a caret range in place of the exact pin, so it stops clashing with your app's own version.
PGVector needs pg
Using PGVector from TypeScript? Install pg yourself
npm install pg
If you use the PGVector store, the SDK now loads the Postgres driver only when that store is used. So install it next to mem0ai with one npm command.
Mem0 for Hermes Agent
05: Mem0 for Hermes Agent
integrations/hermes-plugin-mem0/README.md
Mem0 for Hermes Agent.
Standalone Hermes plugin
Mem0 for Hermes Agent ships as a standalone plugin
It recalls memories before each reply and extracts facts after it.
hermes plugins install \ mem0ai/mem0/integrations/hermes-plugin-mem0 hermes plugins enable mem0 hermes memory setup mem0
Mem0's memory for Hermes Agent, from Nous Research, now has its own plugin. Install it from the Mem0 repository, enable it, and run the memory setup wizard. It recalls memories before each reply.
Three backends
Pick where the memories are kept when you run setup
- Mem0 Cloud, with a Mem0 API key
- a self-hosted Mem0 server, its URL and key
- the OSS SDK, in process, with your own LLM, embedder and vector store
The setup wizard offers three backends. Mem0 Cloud with an API key, your own self-hosted Mem0 server, or the open source SDK running inside Hermes with your own model and vector store.
Upgrade
Mem0 v2.2.1
Python SDK 2.2.1 and TypeScript SDK 3.3.1, 25 September 2026
pip install -U mem0ai npm install mem0ai@latest
pyproject.toml · mem0-ts/package.json
Both SDKs shipped on September twenty-fifth. Upgrade mem0ai from PyPI for Python, or from npm for TypeScript.



















