Install
Homebrew (recommended)
Section titled “Homebrew (recommended)”brew install sanudatta11/tap/statefulmemory # auto-taps the formulastatefulmemory --version # same binary: smem --version / sm --versionstatefulmemory install # wire agents, git hooks, Laya sidecarPrebuilt binaries for macOS (arm64 / Intel) and Linux (arm64 / amd64). After the
tap is present, plain brew install statefulmemory and brew upgrade work too.
Prefer source builds? See below.
Build from source
Section titled “Build from source”Needs: Rust stable (≥ 1.75), protoc, OpenSSL / pkg-config, macOS or Linux (WSL OK).
Python 3.10+ is recommended so install can set up the Laya System-1 sidecar
out of the box (typed decide / conflict / query router).
git clone https://github.com/sanudatta11/statefulmemory && cd statefulmemorymake prereqs && make install # → ~/.local/bin/statefulmemory (+ smem, sm)export PATH="$HOME/.local/bin:$PATH"statefulmemory --version # same binary: smem --version / sm --versionThe daemon auto-starts on first use (self-host default: Unix domain socket).
Put ~/.local/bin on your PATH permanently if statefulmemory / smem / sm is not
found after install. Team TCP self-host and StatefulMemory Cloud (managed SaaS): see
Self-hosting and Cloud.
What install puts where
Section titled “What install puts where”| Path | Role |
|---|---|
~/.local/bin/statefulmemory (+ smem, sm), or Homebrew’s bin/ |
CLI binary (same code) |
~/.statefulmemory/ |
Data dir (created on first use) |
~/.statefulmemory/config.toml |
Written/merged by install (includes [laya] when missing) |
~/.statefulmemory/laya-sidecar/ |
Laya FastAPI app (unless --no-laya) |
~/.statefulmemory/laya-venv/ |
Dedicated Python venv for Laya |
Wire agents, git hooks, and Laya
Section titled “Wire agents, git hooks, and Laya”From any project directory (after the binary is on PATH):
statefulmemory install # or: smem install / sm installstatefulmemory install --no-git-hooks # skip post-commit / post-merge / post-checkoutstatefulmemory install --no-laya # skip Python venv / sidecar spawnWhen cwd is a git repo, install adds hooks that run statefulmemory verify --quiet
after commit, merge, and checkout. That keeps code-anchored memories marked
when HEAD moves. Uninstall strips the statefulmemory blocks from those hooks.
install also writes a bootstrap ~/.statefulmemory/config.toml (hybrid search,
conflict judge, extract, Laya) without clobbering keys you already set.
Laya details: repo tools/laya-sidecar/README.md.
Full agent matrix: Wire into your agent.
Sanity checks
Section titled “Sanity checks”statefulmemory daemon status # same as: smem daemon status / sm daemon statusstatefulmemory doctor # includes Laya enabled / url / healthNext steps
Section titled “Next steps”- Getting started: end-to-end tour
- Wire into your agent: MCP tools and hooks
- Config:
[laya]and other knobs - GitHub: source, issues, and releases