Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memnos_sdk-0.1.19.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memnos_sdk-0.1.19-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file memnos_sdk-0.1.19.tar.gz.

File metadata

  • Download URL: memnos_sdk-0.1.19.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for memnos_sdk-0.1.19.tar.gz
Algorithm Hash digest
SHA256 d1305fb9b070481181ebe173dc5d453a5f740101c299a728c4b217db9a124cad
MD5 08e86fcad35f7706571b7b5d3b65e186
BLAKE2b-256 a04b7480767552bae5edc6415c9c9034568e9844699e08603f092930075508bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for memnos_sdk-0.1.19.tar.gz:

Publisher: release.yml on thameema/memnos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memnos_sdk-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: memnos_sdk-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for memnos_sdk-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 39d4b548d0cef6516b704acc0e03f7c58644756fbb429908cde4434112499392
MD5 9f50fde31bc1fdf95a88d1c843dff15e
BLAKE2b-256 fc90d1b8a7f8d596c983971b1e8f9f8df7ea7e92927f31af24f771a8e0f385d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for memnos_sdk-0.1.19-py3-none-any.whl:

Publisher: release.yml on thameema/memnos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page