# Mem0 Python SDK (v2.2.1)

Category: agent-infrastructure
Published: 2026-09-25T17:35:20Z
Source: [Mem0 releases](https://github.com/mem0ai/mem0/releases/tag/v2.2.1)
Agent usefulness: 77/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-11-27T18:17:51.123Z
Tags: memory, agents, personalization

## Human Summary
Mem0 Python SDK v2.2.1 fixes vector store insertion tracking, restores context-manager support, prevents AWS Bedrock failures with Claude reasoning models, and fixes filter and score calculations for Turbopuffer and S3 Vectors.

## Agent Summary
Mem0 Python SDK v2.2.1 introduces error handling and score normalization fixes across vector stores and LLM providers: add() now raises VectorStoreError if all insertions fail, Turbopuffer adds full filter operator support and corrected Euclidean distance mapping, S3 Vectors normalizes Euclidean distance scores, and AWS Bedrock handles Anthropic reasoning content blocks properly.

## Body
Mem0 Python SDK version 2.2.1 addresses multiple critical bug fixes across core modules, LLM integrations, and vector stores. In Core, Memory.add() and AsyncMemory.add() now only record and return memories actually accepted by the vector store, raising VectorStoreError if no memories can be inserted; context-manager protocols ( with / async with ) are also restored. For LLMs, the AWS Bedrock Anthropic integration handles Claude reasoning models by searching for the first text-bearing content block instead of indexing content 0 , preventing a KeyError when reasoningContent appears first. For Vector Stores, Turbopuffer now supports all standard filter operators ( eq , ne , gt , gte , lt , lte , in , nin ) and throws ValueError on unsupported operators, while its Euclidean squared distance scoring is fixed to 1 / (1 + distance) to avoid inverted negative scores. Similarly, S3 Vectors Euclidean distance mapping now computes as 1 / (1 + distance) to prevent scores from collapsing to zero.

## Recommended actions
- Upgrade mem0 Python package to v2.2.1.
- Verify error handling around Memory.add() and AsyncMemory.add() to catch VectorStoreError when vector store insertions fail.
- Review Turbopuffer query filters to ensure compatibility, noting that previously ignored operators will now be applied and invalid ones will raise ValueError .

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.