aide-memory

aide-memory

Auto-captured, auto-recalled, path-scoped memory for AI coding agents and teams.

Category
访问服务器

README

aide-memory

Auto-captured, auto-recalled, path-scoped memory for AI coding agents and teams.

Website: https://aide-memory.dev

Docs: https://aide-memory.dev/docs

Install: npm install -g aide-memory && aide-memory init


The problem

Coding with agents has made developers significantly more productive. But it's created a new kind of friction.

You explain how the feature you're building ties into the rest of the system, the way you like to structure your code, the patterns to follow in this area. The agent gets it. You ship great work together. Next session, it's a blank slate. You re-explain the same things.

Critical decisions being made during conversations aren't being captured. Preferences, corrections, area knowledge, guidelines. So much valuable context doesn't persist, doesn't flow to the next session, to a different tool, or to a teammate's agent when they pick up work in the same area.

Rules files (CLAUDE.md, .cursorrules) help, but they have real limits:

  • No unified convention or structure. A team guideline, a personal preference, an area decision, and a stack fact all blur into one file. The whole file gets injected on every turn, even when most of it might not be relevant to the area the agent is working in.
  • Corrections don't make it back. What you teach the agent in conversation doesn't make it back into the rules file on its own.
  • Tool-specific. What you teach your agent in Claude Code doesn't carry to Cursor unless you copy the file over manually.
  • Unscoped recall. The whole file lands in context, or nothing does. There's no prompt for the agent to pull a relevant subset based on the file it just opened.

aide-memory fills these gaps. It sits alongside your rules files, not above or below. Rules files for static, always-on guidance. aide-memory for the dynamic, scoped knowledge that grows with the codebase.


How it works

Capture happens automatically

Six hooks fire across the session lifecycle, installed by aide-memory init:

  • UserPromptSubmit: detects corrections ("no, use X instead") and prompts the agent to store them scoped to the code area
  • Stop: periodic reflection ("anything worth remembering?") on a tunable schedule picks up decisions and findings
  • SessionStart: injects top preferences, guidelines, and priority-always memories so the agent starts with context
  • PreToolUse: before the agent reads or edits a file, checks if relevant memories exist for that path and prompts recall
  • PostToolUse: records what was recalled so re-reads don't re-prompt
  • PreCompact: clears session tracking before context compaction so post-compact reads re-prompt cleanly

Recall is scoped

Memories attach to code areas via glob scopes (src/components/dashboard/**, packages/api/**). When the agent opens a file, aide-memory matches the path against stored scopes and surfaces what's relevant to that area.

Four layers organize the knowledge:

Layer What it captures Example
preferences How a contributor likes to work "Prefer modular component structure, separate concerns into smaller files"
technical Facts not obvious from code "Dashboard data fetching uses React Query with stale-while-revalidate"
area_context Decisions tied to code areas "Settings panel uses progressive disclosure; new sections follow the expand/collapse pattern"
guidelines Team-wide principles "Mock external calls at the network boundary in tests, not at the function boundary"

Recall ranks area_context first (most specific), then technical, then preferences, then guidelines. Scoped memories rank above project-wide ones.

Git-synced for teams

Memories are JSON files under .aide/memories/. Commit, push, pull. A post-checkout git hook rebuilds the local cache after git pull so your teammate's agent picks up your context on their next file read. Personal preferences (preferences/personal/) are gitignored. Team conventions travel with the repo.

Cross-tool

Claude Code and Cursor read the same .aide/memories/ directory. A memory captured in one tool is available in the other. Codex, Copilot, and Windsurf get a rules template at launch; deeper integration may come based on user feedback.


Quick start

# 1. Install and initialize
npm install -g aide-memory
aide-memory init

# 2. Restart your editor so the MCP server registers
#    Claude Code: start a fresh session
#    Cursor: Cmd+Q, reopen, enable in Settings > MCP

# 3. Store a memory
aide-memory remember "Dashboard uses skeleton loading, not spinners" \
  --layer area_context --scope "src/components/dashboard/**"

# 4. Recall context for a path
aide-memory recall src/components/dashboard/

# 5. Share with your team
git add .aide/memories/
git commit -m "Capture dashboard conventions"
git push

Full walkthrough: https://aide-memory.dev/docs/quick-start


What's in the box

  • 7 MCP tools: aide_recall, aide_remember, aide_update, aide_forget, aide_search, aide_memories, aide_import
  • 13 CLI commands: init, recall, remember, update, forget, search, list, stats, recall-log, config, sync, migrate, cleanup
  • 6 hooks wired into the editor at init
  • 4 typed memory layers with personal/shared split for preferences
  • FTS5 keyword search plus optional semantic search via Transformers.js or Ollama

Tunable

aide-memory ships with defaults you can adjust:

  • How often the agent gets prompted to reflect and store context
  • How specific a scope needs to be before a memory surfaces per-file vs session-start-only
  • How much context gets injected at session start
  • Which hooks are active (disable per-file blocking, turn off correction detection)
  • Personal vs shared preferences (gitignored or committed, configurable per-project)

aide-memory init seeds .aide/config.json with all public settings. Full reference: https://aide-memory.dev/docs/configuration


Privacy

Memory content stays on your machine. Anonymized usage counts (event type, hashed machine ID, platform, Node version) ship to PostHog by default so we can see which features are used. Disable with AIDE_TELEMETRY=off.


Editor support

Editor Status
Claude Code Reference adapter. Start a fresh session after init so the MCP server registers.
Cursor Full hook + MCP wiring. Cmd+Q and reopen after init, then toggle aide-memory ON in Settings > MCP.
Windsurf, Codex, Copilot Rules template at launch. Deeper integration may come based on user feedback.

Per-editor details: https://aide-memory.dev/docs/supported-editors


Requirements

  • Node.js 18 or later
  • npm or npx

No Docker. No external databases. No API keys. No cloud accounts.


License

Free to use. See LICENSE for terms.


Documentation

Full docs: https://aide-memory.dev

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选