Skip to content
Menu

Product

Solutions

Integrations

Developers

Language

Developers

Quick setup

Install, set up, then launch your agent. Choose a local install for one machine or follow the shared-server steps for a team.

Just me

Install one binary, let it 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. A fresh install keeps its token in an owner-only file that the hooks and the CLI read, so you type none.

  1. Install the binary

    The script downloads the release for your OS and chip, checks it against the published .sha256 file and refuses to install without a match. It links ~/.local/bin/ai-memory and needs no root.

    Terminal
    curl -fsSL https://github.com/akitaonrails/ai-memory/releases/latest/download/install.sh | sh
    
  2. Set it up

    setup creates the data directory and token, starts a per-user service and wires the agents you select. Use setup --plan to preview without changes, or setup --web to choose agents in a local browser page.

    Terminal
    ai-memory setup
    
  3. Launch your agent through it

    Restart your agents once. Launching claude directly keeps working afterwards.

    Terminal
    ai-memory run claude
    

Install

Start the server

127.0.0.1:49374

Run your agent

hooks / MCP

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 way to start an agent. It wires the harness on first launch, picks the right project scope and adds session resume across harnesses. An agent started directly still captures through its hooks, but you forget nothing by going through the launcher. Read how managed launches work.

Check that it works

Three checks, from the network up to the agent.

The server answers

On a fresh authenticated install, this unauthenticated request should return HTTP 401 with “auth required”. That proves reachability only. The next check tests authenticated CLI access.

Terminal
curl -i 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

In a non-sensitive project, ask the first agent to save a specific project decision. End the session, start another supported agent in the same directory, then ask for that decision and the saved page that supports it.

“What project decision did I save, and which memory page records it?”

After the first agent

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

Add another agent

Launch it once through ai-memory and it is wired. Both agents then share one project memory.

Terminal
ai-memory run codex

See every supported agent and its name

Optional: better summaries with an LLM

Capture, search and rule-based summaries work without a provider. Adding one enables richer summaries and scheduled auto-improvement, which auto-applies validated edits by default. On shared servers set [auto_improve] require_approval = true. Set the variables below in the server environment and restart.

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.

alice

bob

carol

One shared server

Token

One wiki for the team

One API key each

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 server behind a local proxy

    Install the native CLI on the server host first. These commands publish Docker only on loopback and set root credentials for the CLI in this shell. Replace memory.example.com with your domain. Keep the root token private; laptops get individual keys later.

    on the server
    ROOT_TOKEN=$(ai-memory generate-auth-token)
    export AI_MEMORY_SERVER_URL="http://127.0.0.1:49374"
    export AI_MEMORY_AUTH_TOKEN="$ROOT_TOKEN"
    docker run -d --name ai-memory \
        --restart unless-stopped \
        -p 127.0.0.1:49374:49374 \
        -v ai-memory-data:/data \
        -e AI_MEMORY_AUTH_TOKEN="$ROOT_TOKEN" \
        -e AI_MEMORY_AUTH__SECURE_COOKIE=true \
        -e AI_MEMORY_ALLOWED_HOSTS="memory.example.com,localhost,127.0.0.1" \
        akitaonrails/ai-memory:latest
    
  2. Configure and verify TLS before connecting clients

    Put a reverse proxy on the same host, forwarding HTTPS for your domain to 127.0.0.1:49374. Follow the TLS setup and verify the certificate from a laptop before sending keys. A bearer token authenticates; it does not encrypt traffic.

  3. Create the people

    Use the server shell where the root environment variables are still exported. The temporary password prints once and must be changed at first login. This command does not issue an API key. The users guide covers root identity and browser login setup.

    Terminal
    ai-memory user add-human --username alice --email alice@home --name "Alice Smith"
    
  4. 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
    
  5. Point each machine at the server

    Install the CLI on each laptop. Replace the domain and key below with your HTTPS endpoint and this person’s issued key. The hook installer stores the token in an owner-only file on Unix; generated hook commands do not contain it. --as-user labels the install and grants no permissions.

    on every laptop
    # Replace the placeholder with this person’s issued aim_ key; never use ROOT_TOKEN
    USER_API_KEY='aim_REPLACE_WITH_ISSUED_KEY'
    export AI_MEMORY_SERVER_URL="https://memory.example.com"
    export AI_MEMORY_AUTH_TOKEN="$USER_API_KEY"
    
    ai-memory install-mcp   --client claude-code --apply
    ai-memory install-hooks --apply --agent claude-code \
        --as-user alice --auth-token "$USER_API_KEY"
    
    # then launch as usual
    ai-memory run claude
    

Stuck on a step?

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