deepmem-client
Drop-in Mem0-compatible client for the DeepMem cloud memory API. Switch from Mem0 in one line - same class name, same method signatures, same
filters={"user_id": ...}style asmem0.MemoryClient.
deepmem-client is a thin HTTP client for the DeepMem cloud memory API
(https://deepmem.dev). It mirrors mem0.MemoryClient's class name and method
signatures, so migrating an app from Mem0 is a one-line import change - no torch,
no Qdrant, no server to run. Just pip install and point it at your cloud key.
Install
pip install deepmem-client
The one-line switch
# ── before: Mem0 cloud ──
from mem0 import MemoryClient
client = MemoryClient(api_key="m0-xxxxxxxx")
client.add(messages, user_id="alex")
client.search("What can Alex cook?", filters={"user_id": "alex"})
# ── after: DeepMem cloud ──
from deepmem import MemoryClient # ← only this line changes
client = MemoryClient(api_key="dm_live_xxxxxxxx") # key at https://deepmem.dev
client.add(messages, user_id="alex")
client.search("What can Alex cook?", filters={"user_id": "alex"}) # identical
That's it. The class name (MemoryClient), method names, and the
filters={"user_id": ...} style all match mem0.MemoryClient, so the rest of
your code stays untouched. (from deepmem import Memory works too as an alias
for mem0's OSS Memory class, with search(query, user_id=...) style.)
Set the key via env and skip passing it each time:
export DEEPMEM_API_KEY=dm_live_xxxxxxxx
from deepmem import mem0_client as client # singleton, reads DEEPMEM_API_KEY / DEEPMEM_BASE_URL
client.add(messages, user_id="alex")
Method reference (mirrors mem0.MemoryClient)
| Method | Signature |
|---|---|
add |
add(messages, user_id=None, agent_id=None, run_id=None, metadata=None, filters=None, infer=True) |
search |
search(query, filters=None, limit=100) → {"results": [...]} |
get_all |
get_all(filters=None, limit=100) → {"count": int, "results": [...]} |
get |
get(memory_id) |
update |
update(memory_id, text) |
delete |
delete(memory_id) |
delete_all |
delete_all(user_id=None, filters=None) |
reset |
reset(user_id=None, filters=None) |
messages may be a list of {role, content} dicts, a single dict, or a string
(just like mem0). search / get_all accept filters={"user_id": "..."} (mem0
style) or a top-level user_id= (convenience).
Behavioral differences from Mem0 (read this)
These are inherent to DeepMem and can't be hidden behind the client:
-
add(infer=True)is asynchronous on DeepMem cloud.add()returns immediately withpending=Trueandresults=[]; extracted facts land a few seconds later. (Mem0 cloud'saddis also async - it returnsPENDING- so this is actually symmetric.) Passinfer=Falsefor synchronous raw-text storage that is immediately searchable (no fact extraction) - useful when you wantaddthensearchto work back-to-back. -
No graph relations. DeepMem uses hybrid vector retrieval (vector + BM25 + time-decay), not a knowledge graph.
"relations"is always[]. -
resetdiffers. Mem0'sreset()is account-wide (deletes ALL users); DeepMem's is per-user_idwith a confirm guard, so this client'sresetrequires auser_id(arg /filters/ default). -
Self-hosted? Point the client at your own server:
MemoryClient(api_key=None, host="http://localhost:8000"). Self-hosted DeepMem runs in open mode (no API key needed).
License
MIT. The full DeepMem server (with LLM extraction, Qdrant, BGE-M3 embeddings, MCP) is at github.com/deepmemteam/deepmem.
Metadata
Release files for deepmem-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deepmem_client-0.1.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deepmem_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / deepmem_client-0.1.0.tar.gz
| Download URL | deepmem_client-0.1.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8edba7d713683fac3b2446e72b5cae21c0d8ba8f0cd2787669a975d51844349a
|
|
BLAKE2b-256 checksum How to use checksums |
04a4032e0e67b82493b1a962dfbc82c1cd70832d5dd99b75ed421b2a2db39dc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / deepmem_client-0.1.0-py3-none-any.whl
| Download URL | deepmem_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e93f3b04ce7e82b024dbeacdef57a683980e1671803849f7aab1df8c66e3921f
|
|
BLAKE2b-256 checksum How to use checksums |
e98f111ccedb051cf206f4614d907831cbf141e31edcad9b64fb72496d15715a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|