Skip to content

Install

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

Terminal window
git clone https://github.com/sanudatta11/statefulmemory && cd statefulmemory
make prereqs && make install # → ~/.local/bin/statefulmemory (+ smem)
export PATH="$HOME/.local/bin:$PATH"
statefulmemory --version # same binary: smem --version

The daemon auto-starts on first use (self-host default: Unix domain socket). Put ~/.local/bin on your PATH permanently if statefulmemory / smem is not found after install. Team TCP self-host and StatefulMemory Cloud (managed SaaS): see Self-hosting and Cloud.

Path Role
~/.local/bin/statefulmemory (+ smem) 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

From any project directory (after the binary is on PATH):

Terminal window
statefulmemory install # or: smem install
statefulmemory install --no-git-hooks # skip post-commit / post-merge / post-checkout
statefulmemory install --no-laya # skip Python venv / sidecar spawn

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

Terminal window
statefulmemory daemon status
statefulmemory doctor # includes Laya enabled / url / health
  1. Getting started: end-to-end tour
  2. Wire into your agent: MCP tools and hooks
  3. Config: [laya] and other knobs
  4. GitHub: source, issues, and releases