The Python SDK exposes one relayer-backed client in two forms, plus middleware:Documentation Index
Fetch the complete documentation index at: https://docs.memwal.ai/llms.txt
Use this file to discover all available pages before exploring further.
| Entry point | Import | When to use |
|---|---|---|
MemWal | from memwal import MemWal | Recommended default — async-native; relayer handles embeddings, SEAL, and storage |
MemWalSync | from memwal import MemWalSync | Same API surface, synchronous — scripts, notebooks, non-async apps |
with_memwal_langchain / with_memwal_openai | from memwal import ... | Automatic recall + save as middleware around an existing LLM client |
- MemWal — the default async/sync client and its core methods
- Manual methods — lower-level
remember_manual/recall_manual/embed - with_memwal — LangChain and OpenAI middleware
Async vs Sync
MemWal is async-native. Every API method is a coroutine:
MemWalSync wraps it through asyncio.run() — identical methods, no await. It is notebook-safe (detects a running loop and offloads to a worker thread):
async with MemWal.create(...) / with MemWalSync.create(...)) which close the underlying HTTP client on exit.
Namespace Rules
- Set a default namespace in
create(...)when one app or agent uses one boundary - Pass
namespace=per call when one client needs multiple boundaries - If omitted, namespace falls back to the client config, then to
"default"
todo, personal, password, project-x. Avoid keeping everything in "default" after early testing.
Async Remember Model
remember returns a RememberAcceptedResult (job_id, status) as soon as the relayer accepts the request — the Walrus upload and on-chain commit happen in a background worker. Three ways to consume it:
remember_bulk_async, wait_for_remember_jobs, and remember_bulk_and_wait. Polling uses jittered exponential backoff (1.5× capped at 10s, ±25%) to stay relayer-friendly at scale.