emem-langmem
LangChain BaseStore backed by emem.dev — drop-in
agent memory for LangGraph with ed25519 receipts and content-addressed
recall.
Install
pip install emem-langmem
Use
from emem_langmem import EmemStore
from langgraph.graph import StateGraph
store = EmemStore(base_url="https://emem.dev", signing_key=SEED)
graph = StateGraph(...).compile(store=store)
SEED is a raw 32-byte ed25519 seed that you own and persist, for
example os.urandom(32) once, then kept wherever the agent's other
secrets live. It signs every write, and the responder requires that:
an unattested write is refused unless the operator opened the responder
with EMEM_MEMORY_OPEN=1. The key also decides where the store writes.
EmemStore implements the four BaseStore verbs by issuing MCP
tools/call requests to the emem responder against the six Anthropic
memory-tool verbs:
| BaseStore verb | emem MCP tool | Signed |
|---|---|---|
mget(keys) |
emem_memory_view |
read, no signature |
mset(pairs) |
emem_memory_create |
yes |
mdelete(ks) |
emem_memory_delete |
yes |
yield_keys |
emem_memory_view (directory walk) |
read, no signature |
Namespaces
With a signing key, the store roots itself at
/memories/by_attester/<pubkey8>/, where <pubkey8> is the first 8
characters of your base32 pubkey. Only that key can write there, so
agents sharing one responder cannot overwrite each other. LangChain
calls mget(("ns","key")) and the store reads
/memories/by_attester/<pubkey8>/ns/key.
store.root # '/memories/by_attester/aoqqpp7t'
store.signer.pubkey_b32 # the full base32 pubkey
A key that starts with / is taken as a literal absolute path and is
left alone, which is how you reach outside your own root. Writing into
another key's namespace is refused with a 403. Without a signing key the
root stays /memories and writes go out unattested. See
docs/memory.html for the wire format.
EmemSigner is public if you drive the memory tools yourself and need
the same attester block:
from emem_langmem import EmemSigner
signer = EmemSigner(SEED)
signer.attester_block("create", f"{signer.namespace_root}/n.md", b"hi")
# {'pubkey_b32': '...', 'sig_b32': '...'}
Async variants amget / amset / amdelete / ayield_keys are
implemented over httpx.AsyncClient.
Self-host
EmemStore(base_url="http://127.0.0.1:5051")
or set EMEM_BASE_URL in the environment.
Receipts
Every read and write returns an ed25519 receipt from the emem responder.
The receipt is currently dropped at the BaseStore interface boundary
(LangChain's contract has no receipt slot). To inspect receipts, call
the underlying MCP tool directly:
import json, httpx, uuid
r = httpx.post(
"https://emem.dev/mcp",
json={
"jsonrpc": "2.0",
"id": str(uuid.uuid4()),
"method": "tools/call",
"params": {
"name": "emem_memory_view",
"arguments": {"path": "/memories/my/note.txt"},
},
},
).json()
print(r["result"]["structuredContent"]["receipt"])
License
Apache-2.0.
Metadata
Release files for emem-langmem 2.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| emem_langmem-2.4.4.tar.gz | 18.2 kB | With provenance | Details for emem_langmem-2.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emem_langmem-2.4.4-py3-none-any.whl | Python 3 | none | any | Details for emem_langmem-2.4.4-py3-none-any.whl |
Total release size: 31.9 kB
Release files / emem_langmem-2.4.4.tar.gz
| Download URL | emem_langmem-2.4.4.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ace9343b7257b83ddcf0232eb1df4d85d8376199d1e152860451abc1db890f99
|
|
BLAKE2b-256 checksum How to use checksums |
c0f4b0e64b43259121d15829f280c0b1931f45072f84d9ec0a637ca798c94cb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / emem_langmem-2.4.4-py3-none-any.whl
| Download URL | emem_langmem-2.4.4-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f251356ea49330154fc0ea014efd0dbe78fcee91f83b22e6f7ba510e68c7216a
|
|
BLAKE2b-256 checksum How to use checksums |
7ff6e6b05d8ed61afc089c369a6852fefb923e74bd2beeaf07c22462df75c6ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logSecurity for emem-langmem 2.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for emem_langmem-2.4.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.