AgentMemory Offline

AgentMemory Offline

Provides local, project-aware memory for coding agents via MCP tools, lifecycle hooks, and a REST service, with no outbound network access.

Category
Visit Server

README

AgentMemory Offline

Persistent, project-aware memory for local coding agents, derived from rohitg00/agentmemory.

This fork keeps memory on the machine and runs its memory services without outbound network access. It preserves the useful parts of AgentMemory—session capture, recall, summaries, semantic structure, MCP tools, hooks, and a local viewer—while disabling cloud model providers, telemetry, runtime downloads, and update checks.

What “offline” means

The runtime is designed so that memory content is never sent to a remote service:

  • no cloud LLM provider is selected;
  • no provider API key is required;
  • no telemetry or update check is enabled;
  • MCP points to the locally installed executable, never to npx;
  • on macOS, the bundled engine is launched through sandbox-exec with non-loopback outbound traffic denied;
  • local retrieval falls back to lexical/BM25 and the local graph.

Building or installing dependencies may still require access to npm and GitHub. That is outside the runtime guarantee. Linux and Windows do not currently get the macOS process-level network sandbox; use an OS firewall or container network policy there if you need an independently enforced boundary.

See docs/OFFLINE_SECURITY.md for the threat model, ports, limitations, and verification procedure.

Where memory is stored

The database and engine state live outside project repositories by default:

Platform Default location
macOS ~/Library/Application Support/agentmemory
Linux $XDG_DATA_HOME/agentmemory or ~/.local/share/agentmemory
Windows %APPDATA%\agentmemory

Override the location with --data-dir <path> or AGENTMEMORY_DATA_DIR=<path>. Memory records carry project/session context, so multiple sessions for the same project can contribute to the same project memory without mixing their session history.

Architecture

Local agent
  ├─ lifecycle hooks ───────────────┐
  └─ MCP tools ────────────────┐    │
                               v    v
                     AgentMemory REST service :3111
                         ├─ local retrieval
                         ├─ local graph/index
                         ├─ session observations
                         └─ local viewer :3113
                                      │
                                      v
                              local iii engine

The default interfaces are local HTTP/MCP surfaces. Set AGENTMEMORY_SECRET to require bearer authentication even on localhost.

Build and run

Requirements: Node.js 20 or newer and the pinned iii engine version shown in src/version.ts.

npm install
npm run build
npm link

agentmemory --data-dir "$HOME/.local/share/agentmemory"

The application will not download the engine at runtime in offline mode. Install the pinned engine ahead of time while online, or place the compatible binary in the private AgentMemory bin directory.

For MCP-only clients:

{
  "mcpServers": {
    "agentmemory": {
      "command": "agentmemory",
      "args": ["mcp"],
      "env": {
        "AGENTMEMORY_URL": "http://127.0.0.1:3111"
      }
    }
  }
}

Host integration

The repository includes portable skills and lifecycle hooks. Installation must merge these declarations with the host's existing configuration; it must not replace unrelated hooks or skills. The MCP manifest calls the locally installed agentmemory executable.

Current limitations

  • Runtime network enforcement is strongest on macOS.
  • The iii engine may create an internal listener on port 49134. The macOS sandbox rejects non-loopback inbound traffic, but users on other systems must bind or firewall that port themselves.
  • Optional vector embeddings are not part of the guaranteed offline profile. BM25 and graph retrieval remain available.
  • Mesh/peer synchronization is outside the offline profile and must remain disabled.

Verification

npm test
npm run build
rg -n "OPENAI_API_KEY|ANTHROPIC_API_KEY|OPENROUTER_API_KEY" .env 2>/dev/null
lsof -nP -iTCP -sTCP:LISTEN | rg "3111|3112|3113|49134"

For a stronger test, deny all external traffic at the OS firewall, start the service, create a memory, stop it, start it again, and recall the same memory.

Provenance and license

This is an independent offline adaptation of AgentMemory. The original project and attribution are preserved in docs/UPSTREAM_README.md. Licensed under Apache-2.0; see LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured