Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Installing ai-memory for your user (instructions for AI agents)
You are an AI coding agent and your user asked you to install ai-memory. It takes two commands, and neither needs root or administrator rights.
Install the release binary. The script checks the download against the release's published SHA-256 checksum, puts the binary under
~/.local/lib/ai-memoryand links~/.local/bin/ai-memoryto it:curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | shIf
~/.local/binis not onPATH, call~/.local/bin/ai-memorydirectly in the next step, and tell your user to add the directory toPATH.On native Windows, in PowerShell, the equivalent script unpacks the release under
%LOCALAPPDATA%\Programs\ai-memoryand adds it to the userPATH:irm https://github.com/akitaonrails/ai-memory/releases/latest/download/install.ps1 | iexA shell started before the install does not see the new
PATH; call& "$env:LOCALAPPDATA\Programs\ai-memory\ai-memory.exe"directly there.Set it up for yourself, naming your own harness:
ai-memory setup --yes --agent <self><self>is one ofclaude-code,codex,opencode,opencode2,gemini-cli,cursor,kimi-code,kiro-cli,grok,copilot-cli,antigravity-cli,command-code,devin,droid,muse,omp,pi,openclaw,qwen-code,qoder(ai-memory setup --helplists every value). Repeat--agentto wire several harnesses. Without--agent,setupwires every harness it finds under the home directory.
setup creates the data directory with a root bearer token in an owner-only
file, starts a per-user service (systemd --user on Linux, a LaunchAgent on
macOS, a logon entry on Windows that runs the server with no console window),
registers the MCP server and installs the lifecycle hooks and Agent
Skills for each harness, then checks that the server answers. The token is
never printed and never written into a harness config. Running setup again
changes nothing.
Afterwards:
- Tell your user to restart the harness so it loads the new MCP entry and hooks.
- If
setupexits non-zero, show your user theproblem:lines it printed. Do not work around them by editing harness configs by hand. - If the server already runs another way (Docker, a packaged system unit), add
--no-service. - Inside WSL2, use the Linux commands; native Windows details are in
docs/windows.md.
Full reference: docs/install.md.