Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginCẩn thậnQuy trình & bộ nhớ agentDễ cho người mới

agentmemory

rohitg00 · rohitg00/agentmemory

Một plugin cung cấp bộ nhớ lâu dài cho các tác tử mã hóa AI như Claude Code và Cursor, mở rộng cơ sở kiến thức của chúng với điểm tin cậy, biểu đồ kiến thức và tìm kiếm lai.

#1 Persistent memory for AI coding agents based on real-world benchmarks

29k sao2.6kGiấy phép: Apache-2.0Cập nhật 12 ngày trước0 lượt mở

Xem kết quả thực tế

Danh sách bộ nhớ đã lưu với tiêu đề, loại và chỉ số độ mạnh.

Ảnh từ README của tác giảDanh sách bộ nhớ đã lưu với tiêu đề, loại và chỉ số độ mạnh.

1/3

Ảnh từ README của tác giả rohitg00 ·Nguồn

Bạn có thể làm gì với nó

  • Cho phép tác tử mã hóa ghi nhớ các cuộc hội thoại và chi tiết dự án trước đó.
  • Ngăn chặn các hạn chế về cửa sổ ngữ cảnh làm cản trở chu kỳ phát triển dài.
  • Xây dựng một cơ sở kiến thức tùy chỉnh để tác tử truy xuất thông tin liên quan hiệu quả.

Thử hỏi agent của bạn

  • “Mô tả kiến trúc của các microservice chúng ta đã thiết kế cho nền tảng thương mại điện tử vào tháng trước.”
  • “Dựa trên cuộc thảo luận trước đây của chúng ta, những thách thức chính được xác định để mở rộng dịch vụ xác thực người dùng là gì?”
  • “Tóm tắt các quyết định quan trọng được đưa ra liên quan đến lựa chọn cơ sở dữ liệu cho module phân tích mới. Sử dụng mem::search.”

Kiểm tra an toàn

Cẩn thận

Dùng được, nhưng nên đọc ghi chú trước.

  • ●Trình cài đặt tải script từ xa và chạy thẳng bằng shell.README.md

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Español | Türkçe | Русский | हिन्दी | Português | Français | Deutsch

The gist extends Karpathy's LLM Wiki pattern with confidence scoring, lifecycle, knowledge graphs, and hybrid search: agentmemory is the implementation.

Install • Quick Start • Benchmarks • vs Competitors • Agents • How It Works • MCP • Viewer • Powered by iii • Config • API


Install

Requirements:

  • Node.js 20 or newer with npm and npx (node -v, npm -v, and npx -v).
  • macOS/Linux automatic iii-engine installation also needs curl, a POSIX sh, and tar. Minimal images such as node:20-slim may not include them.
  • Native Windows requires the pinned iii-engine v0.22.1 iii.exe to be installed manually. WSL2 or Docker Desktop are the other supported paths.

Canonical fresh-install command:

npx -y @agentmemory/agentmemory@latest

The first run is an interactive setup: pick the agents to wire (Claude Code, Cursor, Codex, Gemini CLI, OpenCode, ...), pick an LLM provider or stay keyless, and it seeds the config, starts the memory server and its pinned iii engine, and offers to install globally so the bare agentmemory command works everywhere afterward. -y accepts npx's package prompt and @latest avoids a stale cached release. A provider makes LLM features available, but LLM-written observation compression starts only when AGENTMEMORY_AUTO_COMPRESS=true is also set.

Keyless mode disables vector embeddings. memory_recall (the mem::search path) uses BM25, while memory_smart_search can also fuse structural graph matches when graph data already exists. For free on-device semantic recall, set EMBEDDING_PROVIDER=local in ~/.agentmemory/.env and restart. The first embedding request downloads Xenova/all-MiniLM-L6-v2; inference runs locally after that initial model download.

The local runtime uses four ports: 3111 for REST/MCP HTTP, 3112 for iii streams, 3113 for the viewer, and 49134 for the iii worker WebSocket. Persistent iii state lives in ~/Library/Application Support/agentmemory on macOS, $XDG_DATA_HOME/agentmemory or ~/.local/share/agentmemory on Linux, and %APPDATA%\agentmemory on Windows. Use --data-dir or AGENTMEMORY_DATA_DIR to override it, and reuse the same value on every restart. For backward compatibility, an existing ./data/state_store.db or ./data/iii-config.yaml takes precedence over the platform default for instance 0; an explicit flag or environment override still wins.

Then prove recall works and give your agent its skills:

npx -y @agentmemory/agentmemory@latest demo  # seed sample sessions + exercise recall
npx skills add rohitg00/agentmemory -y   # 17 native skills so your agent knows when to reach for memory

The keyword searches should hit in default keyless mode through BM25. The demo's database performance optimization query is intentionally semantic and can return zero until an embedding provider is configured.

Prefer to let a coding agent do the whole thing? Hand it one instruction:

Retrieve and follow the instructions at: https://raw.githubusercontent.com/rohitg00/agentmemory/main/INSTALL_FOR_AGENTS.md

Wire more agents any time with agentmemory connect — 20 adapters listed at Works with every agent. Full command reference at Quick Start.

Windows

The fast path is WSL2. Native Windows engine setup requires the pinned v0.22.1 ZIP to be downloaded and iii.exe extracted manually; the CLI does not auto-extract it. Docker Desktop is also supported. See the Windows notes for the step-by-step.

Global install / EACCES

npm install -g @agentmemory/agentmemory@latest

The npx command above remains the canonical fresh-install path and avoids global-prefix permission issues.

npx serves an old version

npx caches per version. Force the latest with npx -y @agentmemory/agentmemory@latest, or clear the cache once with rm -rf ~/.npm/_npx (macOS/Linux; on Windows delete %LOCALAPPDATA%\npm-cache\_npx).

Already running your own iii engine

agentmemory pins iii-engine v0.22.1 and won't attach to a different version (the worker can't speak another engine's protocol). Stop the other engine, then run npx -y @agentmemory/agentmemory@latest. It installs and runs the pinned v0.22.1 in ~/.agentmemory/bin, leaving your own iii untouched.


agentmemory works with any agent that supports hooks, MCP, or REST API. All agents share the same memory server.

Claude Code native plugin + 12 hooks + MCP

Codex CLI native plugin + 6 hooks + MCP

GitHub Copilot CLI MCP + plugin hooks/skills

OpenClaw native plugin + MCP

Hermes native plugin + MCP

pi native plugin + MCP

OpenHuman native Memory trait backend

Cursor native plugin + MCP

Gemini CLI MCP server

OpenCode 22 hooks + MCP + plugin

Cline MCP server

Goose MCP server

Kilo Code MCP server

Aider REST API

Claude Desktop MCP server

Devin 6 hooks + MCP

Roo Code MCP server

Warp connect + MCP + skills

Works with any agent that speaks MCP or HTTP. One server, memories shared across all of them.


You explain the same architecture every session. You re-discover the same bugs.

Xem mã nguồn trên GitHub