memnos-sdk
Lightweight Python client for memnos — governed, vendor-neutral backend memory for AI agents. Use it directly, or as a LangChain retriever, a LangGraph long-term-memory store, or a LlamaIndex retriever.
httpx-only (no server deps). Talks to a running memnos server over REST.
Add it to your project with uv (or plain pip — it's an importable library, not a CLI app):
uv pip install memnos-sdk # core client (or: pip install memnos-sdk)
uv pip install 'memnos-sdk[langchain]' # + LangChain retriever
uv pip install 'memnos-sdk[langgraph]' # + LangGraph BaseStore
uv pip install 'memnos-sdk[llamaindex]' # + LlamaIndex retriever
uv pip install 'memnos-sdk[all]' # everything
Core client (sync + async)
from memnos_sdk import MemnosClient
with MemnosClient(base_url="http://127.0.0.1:8900", token="mnk_...", namespace="org:acme") as mem:
mem.remember("We chose PostgreSQL + pgvector for the memory store")
ctx = mem.context("what database did we choose?") # ready-to-inject; no LLM at query time
rows = mem.recall("database decision")["memories"] # ranked memories w/ scores + dates
from memnos_sdk import AsyncMemnosClient
async with AsyncMemnosClient(token="mnk_...", namespace="org:acme") as mem:
await mem.remember("...")
print(await mem.context("..."))
A token + namespace come from your memnos admin (memnos token <principal>,
memnos grant <principal> <namespace>). Every call is namespace-scoped and audited
server-side.
LangChain
from memnos_sdk import MemnosClient
from memnos_sdk.integrations.langchain import MemnosRetriever
retriever = MemnosRetriever(client=MemnosClient(token="mnk_...", namespace="org:acme"))
docs = retriever.invoke("auth token expiry policy") # drop into any RAG chain
retriever.save("JWT tokens expire after 15 minutes in prod")
LangGraph (long-term memory)
from memnos_sdk import MemnosClient
from memnos_sdk.integrations.langgraph import MemnosStore
store = MemnosStore(MemnosClient(token="mnk_..."))
graph = builder.compile(store=store)
# in a node: store.search(("org","acme"), query="...") · store.put(("org","acme"), key, {"text": "..."})
memnos is semantic memory: put→remember, search→hybrid+reranked recall. Exact-key
get is best-effort (use search).
LlamaIndex
from memnos_sdk import MemnosClient
from memnos_sdk.integrations.llamaindex import MemnosRetriever
retriever = MemnosRetriever(client=MemnosClient(token="mnk_...", namespace="org:acme"))
nodes = retriever.retrieve("auth token expiry policy") # NodeWithScore[]; drop into a query engine
retriever.save("JWT tokens expire after 15 minutes in prod")
API surface
remember(text) · recall(query) -> {memories, context} · context(query) -> str ·
consolidate() · feedback(query, helpful) · healthy(). Async mirror on
AsyncMemnosClient.
Apache-2.0.
Release files for memnos-sdk 0.1.33
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| memnos_sdk-0.1.33.tar.gz | 18.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| memnos_sdk-0.1.33-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / memnos_sdk-0.1.33.tar.gz
| Download URL | memnos_sdk-0.1.33.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bfc7ea67cb007b9f80fced5f440fa8b87600c49f3b7daef94420a9681390231
|
|
BLAKE2b-256 checksum How to use checksums |
5e8576899c40ced91c019dc245897248f5208c9cf3cf3680e57ddf9e1380a57b
|
| 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 Sep 25, 2026.
Transparency logRelease files / memnos_sdk-0.1.33-py3-none-any.whl
| Download URL | memnos_sdk-0.1.33-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1e9953c6381ba3e787b0915b98cdb2f7102ea0927b7aa327a3a9c2d92457ffc
|
|
BLAKE2b-256 checksum How to use checksums |
422c0b867995325f1f68a439140e54899f95996cfa4f386213a42f8596580731
|
| 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 Sep 25, 2026.
Transparency log