Registry / storage / supermemory

supermemory

JSON →
library3.45.0pypypi✓ verified 84d ago

The official Python library for the Supermemory API, providing programmatic access to memory storage, retrieval, and management. Current version 3.45.0, requires Python ≥3.9, updated regularly.

pip install supermemory
INSTALL
IMPORT
SIG · SUPERMEMORY
S
supermemory
storagepythonv3.45.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Supermemory
from supermemory import Supermemory
from supermemory.client import Supermemory
Supermemory is exposed directly at package level since v3.0.
Memory
from supermemory import Memory
from supermemory.models import Memory
Memory is a top-level import, not in models submodule.

Initialize client with API key, create and list memories.

from supermemory import Supermemory import os client = Supermemory(api_key=os.environ.get('SUPERMEMORY_API_KEY', '')) # Create a memory memory = client.memories.create( content="My first memory", tags=["important", "example"] ) print(memory.id) # List memories memories = client.memories.list(limit=10) for m in memories: print(m.content)
Debug
Known issues
breakingIn v3.0, the client initialisation changed from positional args to keyword-only arguments. `Supermemory('api-key')` no longer works; use `Supermemory(api_key='...')`.
fix
Pass api_key as keyword argument: Supermemory(api_key='your-key')
affects: <3.0 → >=3.0
gotchaThe `memories.create()` method requires `content` as a positional or keyword argument, but optional fields like `tags`, `metadata` must be passed as keyword arguments only. Mixing positional and keyword args for optional fields causes TypeError.
fix
Always pass optional arguments as keywords: client.memories.create(content='...', tags=[], metadata={})
affects: all
deprecatedThe `memories.update()` method is deprecated in v3.40.0 and will be removed in v4.0. Use `memories.patch()` instead.
fix
Replace client.memories.update(id, ...) with client.memories.patch(id, ...)
affects: >=3.40.0
Errors
Common errors & fixes
supermemory.exceptions.SupermemoryError: 401 Unauthorized
Invalid or missing API key.
fix
Ensure you set SUPERMEMORY_API_KEY environment variable or pass a valid api_key to the Supermemory constructor.
TypeError: 'NoneType' object is not iterable
Trying to iterate over a response that is None, often due to forgetting to assign the client.memories.list() result to a variable.
fix
Assign the result to a variable: memories = client.memories.list(limit=10). Then iterate over memories.
AttributeError: module 'supermemory' has no attribute 'Supermemory'
Importing the package incorrectly, e.g., import supermemory then using supermemory.Supermemory after an older version that didn't expose it at top level.
fix
Use 'from supermemory import Supermemory' or ensure you have v3.0+ (pip install --upgrade supermemory).
Upgrade
Version history
3.45.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
httpxrequiredHTTP client for API requests
pydanticrequiredData validation and serialization
Agent activity
36 hits · last 30 days
node
34
Amazon
1
Resources
supermemory — pip install supermemory · libregistry