Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Aimemory

FreeNot checked

Gives AI agents persistent memory with semantic search, automatic extraction, and memory decay, accessible via MCP protocol.

GitHubEmbed

About

Gives AI agents persistent memory with semantic search, automatic extraction, and memory decay, accessible via MCP protocol.

README

Give your AI a real memory.

AI Agent Memory Service — cross-platform, model-agnostic, fully under your control.

Why?

ChatGPT, Claude, Gemini — they all start from scratch every conversation. They don't remember who you are, what you prefer, or what decisions you've made.

aimemory fixes that:

  • 🧠 Smart extraction — automatically picks out worth-remembering info from conversations
  • 🔍 Semantic search — finds memories by meaning, not just keywords (3-engine: local neural network → Gemini API → TF-IDF)
  • 📂 Auto-categorization — people, preferences, decisions, events, knowledge
  • Memory decay — simulates human forgetting curves: important things stick, trivial things fade
  • 🔌 MCP protocol — any MCP-compatible AI agent can use it directly
  • 🌍 Bilingual — full Chinese + English support, cross-language search
  • 🧠 Local neural network — all-MiniLM-L6-v2 (22M params), runs on CPU, zero API cost
  • 💰 Zero cost — local SQLite storage, works fully offline

Quick Start

# 一行命令配置 MCP(自动检测 Claude Desktop / Cursor / Windsurf / Cline)
npx aimemory-agent setup

# Or if installed globally
aimem setup
# Add a memory
aimem add "User prefers dark mode and minimal UI" --cat preference --imp 0.8

# Keyword search
aimem search "dark mode"

# Semantic search (finds related meanings)
aimem search -s "what does the user like"

# Export all memories
aimem export backup.json

# Import memories
aimem import backup.json

# Stats
aimem stats

# Apply memory decay
aimem decay

MCP Server

Auto Setup (Recommended)

aimem setup              # 自动检测并配置所有已安装的客户端
aimem setup --force      # 强制覆盖已有配置
aimem setup cursor       # 只配置 Cursor

Manual Config

{
  "mcpServers": {
    "aimemory": {
      "command": "node",
      "args": ["path/to/aimemory/src/mcp-server.js"]
    }
  }
}

Available Tools

Tool Description
memory_add Store a new memory
memory_search Keyword search
memory_semantic_search Semantic similarity search
memory_forget Delete a memory
memory_extract Auto-extract memories from text
memory_rebuild_index Rebuild vector index
memory_auto Auto-extract & save memories from conversation summary
memory_stats Get statistics

Architecture

CLI / MCP Server
      ↓
  MemoryEngine (memory.js)
   ├── Keyword search (FTS5 + LIKE)
   ├── Semantic search (Gemini embedding + TF-IDF fallback)
   ├── Memory decay (forgetting curve)
   └── Entity relations
      ↓
  SQLite (db.js)

Dual Search Engine

  • Gemini embedding (3072-dim) — real semantic understanding, cross-language
  • TF-IDF fallback — zero-dependency, works offline
  • Gemini is used when API key is available; TF-IDF kicks in automatically otherwise

Zero Dependencies

Only uses Node.js built-in modules. No node_modules needed for core functionality.

Data Storage

Default: ~/.aimemory/memories.db

Override with:

export AIMEM_DB=/path/to/your/memories.db

Roadmap

  • Core engine (storage + search + extraction + decay)
  • Semantic search (dual engine)
  • MCP Server
  • CLI with export/import
  • npm package publish
  • Web Dashboard
  • Cloud sync
  • Chrome extension
  • Obsidian plugin

License

MIT


中文说明

让你的AI真正记住你。

AI Agent 记忆服务 — 跨平台、跨模型、你完全掌控。

功能

  • 🧠 智能记忆提取 — 自动从对话中抽取值得记住的信息
  • 🔍 语义搜索 — 双引擎:Gemini embedding(跨语言)+ TF-IDF(离线兜底)
  • 📂 自动分类 — 人物、偏好、决策、事件、知识
  • ⏰ 记忆衰减 — 模拟人类遗忘曲线
  • 🔌 MCP协议 — 任何支持MCP的AI agent都能接入
  • 💰 零成本 — 本地SQLite,零外部依赖

快速使用

# 一行命令配置 MCP
aimem setup

aimem add "用户喜欢简洁的UI" --cat preference --imp 0.8
aimem search -s "用户喜欢什么"
aimem export backup.json
aimem import backup.json

详细用法见上方英文文档。

from github.com/George3307/aimemory

Install Aimemory in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install aimemory

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add aimemory -- npx -y aimemory-agent

FAQ

Is Aimemory MCP free?

Yes, Aimemory MCP is free — one-click install via Unyly at no cost.

Does Aimemory need an API key?

No, Aimemory runs without API keys or environment variables.

Is Aimemory hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Aimemory in Claude Desktop, Claude Code or Cursor?

Open Aimemory on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Aimemory with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All ai MCPs