Mem0 v2.2.1 stops reporting memories it never stored

1 hour ago

@mem0Subscribe

Mem0 v2.2.1: add() stops reporting memories the vector store rejected, Turbopuffer filters apply every operator, S3 Vectors and Turbopuffer scores rank correctly, Claude reasoning models work on Bedrock, pg becomes optional in the TypeScript SDK, and Mem0 for Hermes Agent ships as a standalone plugin. https://github.com/mem0ai/mem0/releases/tag/v2.2.1 https://github.com/mem0ai/mem0/compare/v2.2.0...v2.2.1 https://docs.mem0.ai/integrations/hermes

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Mem0 v2.2.1
  2. 0:11What add() returns
  3. 0:13Only inserted records count
  4. 0:25VectorStoreError
  5. 0:37Context manager is back
  6. 0:47Vector store search
  7. 0:49Turbopuffer filters
  8. 1:04Turbopuffer scores
  9. 1:18S3 Vectors scores
  10. 1:31Models and providers
  11. 1:33Bedrock reasoning models
  12. 1:46Provider defaults
  13. 2:00Installing from npm
  14. 2:02pg is optional
  15. 2:16PGVector needs pg
  16. 2:28Mem0 for Hermes Agent
  17. 2:30Standalone Hermes plugin
  18. 2:44Three backends
  19. 2:57Upgrade
Show transcript

Mem0 v2.2.1

Mem0

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

0102030405 Memory · AsyncMemory

Only records the store inserted reach history and the result

  • written to history
  • linked to entities
  • returned to your code
mem0/memory/main.py

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

0102030405 VectorStoreError

When nothing could be stored, add() raises an error

beforereturned memories that were never stored
nowraises VectorStoreError
docs/changelog/sdk.mdx

If 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

0102030405 Memory · AsyncMemory

with Memory() as m: works again

The instance closes when the block exits.

with Memory() as m:
    ...

async with AsyncMemory() as m:
    ...
docs/changelog/sdk.mdx

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

0102030405 filters

Turbopuffer filters now apply every operator

In the Python and the TypeScript SDK.

eqnegtgteltlteinnin

Before, eq, ne, in and nin were dropped and the query ran unfiltered.

mem0/vector_stores/turbopuffer.py · mem0-ts/src/oss/src/vector_stores/turbopuffer.ts

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

0102030405 search()

Turbopuffer ranks euclidean_squared results in the right order

before1 - distance, negative above 1, ranking inverted
now1 / (1 + distance)
docs/changelog/sdk.mdx

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

0102030405 euclidean

S3 Vectors scores stop collapsing to zero

beforemax(0, 1 - distance), most scores 0
now1 / (1 + distance)
mem0/vector_stores/s3_vectors.py

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

0102030405 AWS Bedrock

Claude reasoning models on Bedrock stop failing with a KeyError

beforeread content[0], a reasoningContent block
nowthe first block that carries text
mem0/llms/aws_bedrock.py

On 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

0102030405 TypeScript

A DeepSeek or xAI config stays pointed at DeepSeek or xAI

OpenAI's default baseURL and model now apply only to OpenAI.

beforeOpenAI's URL, with an OpenAI model name
nowthe provider's defaults and DEEPSEEK_API_BASE, XAI_API_BASE
mem0-ts/src/oss/src/config/manager.ts

In 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

0102030405 TypeScript

npm install mem0ai no longer pulls in pg

pg, @types/pg and natural are optional peer dependencies.

beforepg pinned at exactly 8.11.3
nowa caret range, and only if you want it
mem0-ts/package.json

Installing 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

0102030405 PGVector

Using PGVector from TypeScript? Install pg yourself

npm install pg
docs/components/vectordbs/dbs/pgvector.mdx

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

0102030405 hermes-plugin-mem0

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
integrations/hermes-plugin-mem0/README.md

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

0102030405 hermes memory setup

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
integrations/hermes-plugin-mem0/README.md

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

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.