Developers
Drop it under the agents you already use.
One server, one memory, every surface a client. HTTP, MCP, CLI, OpenClaw. No SDK required.
Rust · SQLite · Apache-2.0 · loopback by default
Quickstart
From clone to recall.
Four steps, one binary. The commands assume Rust is installed and the repository is public.
1 Build
build · terminalgit clone https://github.com/stewardmem/stewardmem.git cd stewardmem cargo build --release --features bench2 Run
run · terminal./target/release/brain-server # data: ~/.openclaw/workspace/brain.db # bind: 127.0.0.1:87653 Ingest
ingest · terminal./target/release/brain ingest-dir ./policies4 Recall
recall · terminalcurl -s http://127.0.0.1:8765/recall \ -H "content-type: application/json" \ -d '{"v":1,"query":"refund policy","limit":3,"provenance":true}'
BRAIN_DB_PATH overrides the database path. BIND_PUBLIC=1 retains public HTTP through 2027-04-11 with a startup warning; use a TLS-terminating reverse proxy for remote access. Unauthenticated non-loopback binds refuse startup.
HTTP
The API is the product.
The generated OpenAPI contract ships with the server. The desktop client is generated from it and byte-compared in CI.
Recall with provenance
curl -s http://127.0.0.1:8765/recall \
-H "content-type: application/json" \
-d '{
"v": 1,
"query": "damaged item refund policy",
"domain": "acme-support",
"limit": 5,
"provenance": true
}'Propose a memory
curl -s http://127.0.0.1:8765/ingest/proposal \
-H "content-type: application/json" \
-d '{
"content": "Refunds for damaged items require a photo within 30 days.",
"kind": "fact",
"source": "support-policy"
}'Approve the exact bytes
# The digest is the one returned by GET /proposals.
curl -s -X POST \
"http://127.0.0.1:8765/proposals/4821/approve?digest=sha256%3A9f2c…7b41" \
-H "authorization: Bearer $BRAIN_TOKEN"Verify the chain
curl -s http://127.0.0.1:8765/audit/verify
# {"ok": true, "domains": {"global": true}}Run a DSAR
curl -s http://127.0.0.1:8765/dsar \
-H "authorization: Bearer $BRAIN_TOKEN" \
-H "content-type: application/json" \
-d '{"subject":"alice@example.com","action":"both","dry_run":false}'Admin-only routes require an operator token. Never ship a token in client-side code. The full contract: openapi.yaml.
MCP
Give your agent a memory tool.
The MCP server exposes search, recall, ingest, and the UMP family over stdio or HTTP/SSE. Point your client at the binary; no adapter needed.
Tools
- search: lexical, vector, or hybrid
- recall: deterministic end-to-end recall with provenance
- ingest: structured ingest, subject to posture
- ump.remember, ump.revise, ump.forget, ump.feedback
- ump.recall, ump.get, ump.audit, ump.audit.verify
- ump.capabilities
Recalled text is data.
Results ride an UNTRUSTED_* fence. Invisible and bidi characters are stripped at the render boundary. The model should treat memory as evidence, not as instructions.
Client config
{
"mcpServers": {
"stewardmem": {
"command": "brain-server",
"args": ["--mcp", "--db", "/var/lib/stewardmem/brain.db"]
}
}
}CLI
The terminal is a first-class client.
The CLI is the same server over the same API. It is not a second implementation.
brain status
brain doctor
brain query "refund policy" --k 5
brain explain "refund policy"
brain ingest-dir ./policies
brain reconcile
brain verify-governance
brain ump capabilities
brain backup --out ./backups
brain restore --from ./backups/latestOpenClaw
Memory on every turn.
The OpenClaw plugin declares kind: "memory" and calls recall before each turn. The result is fenced before it reaches the model.
{
"kind": "memory",
"endpoint": "http://127.0.0.1:8765",
"recallOnTurn": true,
"untrustedFence": true
}UMP
A protocol, not just an API.
Universal Memory Protocol 1.0 defines remember, revise, forget, feedback, recall, get, audit, and capabilities. StewardMem conforms at L3 with an operator key, L2 without one.
curl -s http://127.0.0.1:8765/ump/capabilitiesThe handshake tells a client what it can rely on: conformance level, kinds, bindings, retrieval signals, max recall, and writability.
Review posture
Turn the gate on before the agents arrive.
The default posture is open: trusted pipelines write directly. Set review posture before you let an agent or an untrusted source propose memory. In review posture, a write is a proposal until a human approves the digest.
BRAIN_WRITE_POSTURE=review ./target/release/brain-serverIf you skip this, the product still stores and recalls memory. It just does not gate the write. That is a configuration choice, and the site should not pretend otherwise.
Deployment
Where it runs.
A deployment mode is a support statement. The unproven ones are marked.
| Mode | Shape | Status |
|---|---|---|
| Laptop | One binary, loopback, SQLite file | Shipped |
| On-prem server | systemd unit, reverse proxy, warm standby | Shipped |
| Container | Single image, mounted volume | Shipped |
| Desktop | Tauri + SvelteKit console | Shipped |
| Edge 4 GB ARM | Designed for; not measured on ARM CI | Not proven |
| Hosted SaaS | Does not exist | Not offered |
The desktop app is a client. It does not run a second server. If the server is down, the console says so; it does not fake a local copy.