AgentMemory Offline
Provides local, project-aware memory for coding agents via MCP tools, lifecycle hooks, and a REST service, with no outbound network access.
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-execwith 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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。