Skip to content
Menu

Product

Solutions

Integrations

Developers

Language

Developers

Quick setup

Pick your track and copy the commands. One machine takes three steps and no account. A shared server for a team takes five.

Just me

Install one binary, start one local server, then launch your agent. The server binds to 127.0.0.1:49374, so nothing outside this machine can reach it and it needs no token.

  1. Install the binary

    mise downloads the release archive for your OS and chip and checks it against the published .sha256 file. It needs no Rust toolchain and no Docker.

    Terminal
    mise use -g github:akitaonrails/ai-memory
    
  2. Create the data directory and start the server

    init only creates the data directory. serve has to stay running, so give it its own terminal. It listens on this machine only and needs no token.

    Terminal
    ai-memory init
    ai-memory serve --transport http --bind 127.0.0.1:49374
    
  3. Launch your agent through it

    The first launch of a harness installs its hooks and MCP entry if they are missing. Launching claude directly keeps working afterwards.

    Terminal
    ai-memory run claude
    
The solo install in three stages on one laptop: install the binary, start the server on 127.0.0.1:49374, then run your agent, which connects to the server through hooks and MCP. Nothing leaves the laptop.
The whole solo path. The server stays on loopback, and your agent reaches it two ways: hooks capture the session, MCP lets the agent search it.

ai-memory run is the recommended launcher and it is optional. It wires a harness on first launch and adds native session resume across harnesses. Hooks alone already carry the handoff, so launching your agent directly keeps working. Read how managed launches work.

Check that it works

Three checks, from the network up to the agent.

The server answers

A JSON-RPC error is the right answer. It means the port is reachable and the server is responding.

Terminal
curl http://127.0.0.1:49374/mcp

The CLI reaches it

The CLI is a thin HTTP client. If this prints a status, hooks can reach the server too.

Terminal
ai-memory status

The agent remembers

Work for a few minutes, quit, and open a second session in the same directory. Then ask it:

“Where did we leave off?”

After the first agent

All three are optional. Do them when you need them.

Add another agent

Run the same two commands with a different name. Both agents then share one project memory.

Terminal
ai-memory install-mcp   --client codex --apply
ai-memory install-hooks --agent  codex --apply

See every supported agent and its name

Optional: better summaries with an LLM

Without a provider, capture, search and rule-based summaries all work at no cost. A provider rewrites session pages as readable narratives. Set these two variables in the server’s environment (-e flags for Docker, ~/.config/ai-memory/env for the systemd user service) and restart it.

server environment
AI_MEMORY_LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...

Compare providers, including subscriptions and local models

Undo everything

This removes only what ai-memory installed. Install commands are idempotent, and each one writes a timestamped backup next to any file it touches.

Terminal
ai-memory uninstall --apply

My team

One server that every machine and every teammate reaches. There is no replication between servers: shared memory means everyone connects to the same one.

Team topology: three laptops for alice, bob and carol each connect to one shared server protected by a token. Each person has one API key, and the server holds one wiki for the team.
The server holds the wiki. People get accounts, machines get API keys, and the root token stays with whoever runs the server.
  1. Start the shared server with a token

    Pick a homelab box or any LAN host. A server bound beyond loopback needs both a bearer token and a host allowlist. The allowlist holds every name or IP your machines use to reach it.

    on the server
    TOKEN=$(ai-memory generate-auth-token)
    docker run -d --name ai-memory \
        --restart unless-stopped \
        -p 0.0.0.0:49374:49374 \
        -v ai-memory-data:/data \
        -e AI_MEMORY_AUTH_TOKEN="$TOKEN" \
        -e AI_MEMORY_ALLOWED_HOSTS="<server-ip>,localhost,127.0.0.1" \
        akitaonrails/ai-memory:latest
    
  2. Create the people

    Run this with the root token exported. The temporary password prints once, and the person changes it at first login. It does not issue an API key. The users guide covers the root identity in [auth].

    Terminal
    ai-memory user add-human --username alice --email alice@home --name "Alice Smith"
    
  3. Give each person an API key

    The aim_ secret is shown once. ai-memory api-key rotate <id> and ai-memory api-key revoke <id> take effect immediately.

    Terminal
    ai-memory api-key add --username alice --label codex-laptop
    
  4. Point each machine at the server

    Each person uses their own key as the token. It is stored in a 0600 file in the data directory and stays off the hook command line. --as-user only labels the install.

    on every laptop
    # TOKEN here is this person's aim_ key, not the root token
    export AI_MEMORY_SERVER_URL="http://<server-ip>:49374"
    export AI_MEMORY_AUTH_TOKEN="$TOKEN"
    
    ai-memory install-mcp   --client claude-code --apply
    ai-memory install-hooks --apply --agent claude-code \
        --as-user alice --auth-token aim_XGq...<secret>
    
  5. Add TLS before leaving the LAN

    A bearer token authenticates a request and does not encrypt it. Keys and web cookies travel in the clear over plain HTTP, so put Caddy, nginx or a Cloudflare Tunnel in front once accounts exist or the server is reachable beyond your desk.

Stuck on a step?

The install cookbook on GitHub has the per-agent commands, remote servers and Windows. The issue tracker is open.