Skip to main content

Persistent Memory for AI Coding Assistants

LongMem keeps a private, local memory of your coding work so your AI assistant always starts with context. Never repeat yourself again.

Local-first storage
Privacy-aware
Cross-session context

Quick start

Get LongMem running in less than a minute

1

Install LongMem

Run the installer script to download and configure LongMem:
curl -fsSL https://github.com/clouitreee/LongMem/releases/latest/download/install.sh | bash
The installer will guide you through privacy settings, auto-context options, and optional compression setup.
2

Start the daemon

Launch the LongMem daemon to begin recording your coding sessions:
longmem start
Verify it’s running:
longmem status
3

Use your AI assistant

LongMem automatically hooks into OpenCode and Claude Code CLI. Just start coding — your AI assistant now has access to your past sessions.
LongMem captures prompts, tool outputs, and file references. All data is stored locally in ~/.longmem/memory.db

Explore by topic

Dive deeper into LongMem’s capabilities

CLI commands

Complete reference for all longmem commands: start, stop, status, stats, logs, and export

Configuration

Configure privacy modes, compression providers, daemon settings, and more

Integrations

Set up LongMem with OpenCode, Claude Code CLI, or as an MCP server

API reference

HTTP API documentation for the LongMem daemon

Ready to get started?

Install LongMem in less than a minute and give your AI assistant the gift of memory.

Install LongMem