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. 1 Build

    build · terminal
    git clone https://github.com/stewardmem/stewardmem.git
    cd stewardmem
    cargo build --release --features bench
  2. 2 Run

    run · terminal
    ./target/release/brain-server
    # data: ~/.openclaw/workspace/brain.db
    # bind: 127.0.0.1:8765
  3. 3 Ingest

    ingest · terminal
    ./target/release/brain ingest-dir ./policies
  4. 4 Recall

    recall · terminal
    curl -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

http
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

http
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

http
# 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

http
curl -s http://127.0.0.1:8765/audit/verify
# {"ok": true, "domains": {"global": true}}

Run a DSAR

http
curl -s http://127.0.0.1:8765/dsar \
  -H "authorization: Bearer $BRAIN_TOKEN" \
  -H "content-type: application/json" \
  -d '{"subject":"[email protected]","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

mcp 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 cli
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/latest

OpenClaw

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.

openclaw plugin
{
  "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.

terminal
curl -s http://127.0.0.1:8765/ump/capabilities

The 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.

review posture
BRAIN_WRITE_POSTURE=review ./target/release/brain-server

If 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.

ModeShapeStatus
LaptopOne binary, loopback, SQLite fileShipped
On-prem serversystemd unit, reverse proxy, warm standbyShipped
ContainerSingle image, mounted volumeShipped
DesktopTauri + SvelteKit consoleShipped
Edge 4 GB ARMDesigned for; not measured on ARM CINot proven
Hosted SaaSDoes not existNot 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.