mem-agent captures significant events from your coding sessions, extracts principles, builds skill recipes, and injects context — all powered by an LLM backend.
Works with Claude Code, OpenCode, and Codex out of the box.
Note: This is the LLM-dependent version. For standalone memory management without LLM dependency, see mem.
go install github.com/snow-ghost/mem-agent/cmd/mem@latestOr download from Releases.
cd your-project
mem status # auto-initializes .memory/
mem extract # capture events (requires LLM backend)
mem consolidate # synthesize principles
mem inject # output context for next sessionAuto-detects: claude > opencode > codex. Or set explicitly:
export MEM_BACKEND=opencodeSee full docs in the codebase.
MIT