Metadata-Version: 2.4
Name: membase-sdk
Version: 0.1.0
Summary: Membase — your memory, from code. The official Python client for the Membase API.
Author: Unibase
License: MIT
Project-URL: Homepage, https://www.app.membase.io
Project-URL: Documentation, https://www.app.membase.io/skill
Keywords: membase,memory,ai,agents,mcp
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1,>=0.25

# membase-sdk

Your memory, from code. The official Python client for the [Membase](https://www.app.membase.io) API.

```bash
pip install membase-sdk
export MEMBASE_API_KEY="mbk_…"     # Connect › Developer keys in the Membase app
```

```python
from membase import Membase

client = Membase()

client.add("Call notes with Acme: they want SSO before the pilot.", container="mv-…", custom_id="call-2026-09-24")
hits = client.search("what does Acme need before the pilot", limit=5)
print(hits["results"][0]["content"])

client.profile(q="working hours")           # who the user is (needs the profile tick on the key)
client.containers.list()
client.documents.list(container="mv-…")
client.memories.add("The user prefers dark mode.", static=True)
client.documents.delete("srcitem_…", confirm=True)   # Full access; confirm means the person agreed
```

Every method is one operation of the Membase agent protocol; access level, reach and confirmation
rules are enforced server-side. Errors are one class per HTTP status (`PermissionDeniedError`,
`RateLimitError`, …) and carry the API's `code` and `trace_id`. 429 and 5xx answers are retried
twice with backoff; the default timeout is 90 s, because the first search after a quiet spell
waits for the user's memory to wake.

Docs: the developer documentation's *SDK Quickstart*. Works against a self-hosted Membase too:
`Membase(base_url="http://localhost:8080")`.
