能力标签
铁记忆
⚙️
Agent工作流

铁记忆

基于 Rust · 无代码搭建完整 AI 自动化流程
英文名:Iron-mem
⭐ 5 Stars 💻 Rust 📄 Apache-2.0 🏷 AI 7.2分
7.2AI 综合评分
AI编码会话记忆上下文管理CLI工具Rust实现
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,铁记忆 获评「推荐使用」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.2 分,适合有一定技术背景的用户使用。

📚 深度解析

铁记忆 是一套完整的 AI Agent 自动化工作流方案。随着 AI 能力的不断提升,基于 Agent 的自动化工作流正在成为提升个人和团队效率的核心方式。区别于传统的 RPA 自动化(模拟鼠标键盘操作),AI Agent 工作流通过理解任务意图、动态规划执行路径,能够处理更复杂的非结构化任务。

铁记忆 工作流的设计遵循"最小配置,最大复用"原则:核心逻辑已经封装好,用户只需配置自己的 API Key 和业务参数即可快速上手。工作流内置错误处理和重试机制,在网络波动或 API 限速等情况下仍能稳定运行,适合作为生产环境的自动化基础设施。

在实际部署时,建议先在测试环境中运行 3-5 次,验证各个环节的输出结果符合预期,再部署到生产环境。AI Skill Hub 评分 7.2 分,是同类 Agent 工作流中的精选推荐。

📋 工具概览

为AI编码助手提供持久化会话记忆的开源工作流工具。自动记录编码上下文,支持Claude Code和Copilot等助手,帮助开发者维持长期对话记忆,提升AI辅助编程效率。适合需要持续编码协助的开发者。

铁记忆 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

GitHub Stars
⭐ 5
开发语言
Rust
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
Apache-2.0
AI 综合评分
7.2 分
工具类型
Agent工作流
Forks

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

为AI编码助手提供持久化会话记忆的开源工作流工具。自动记录编码上下文,支持Claude Code和Copilot等助手,帮助开发者维持长期对话记忆,提升AI辅助编程效率。适合需要持续编码协助的开发者。

铁记忆 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

📌 核心特色
  • 可视化 Agent 工作流编排,无需编写复杂代码
  • 支持多步骤自动化任务链,实现全流程无人值守
  • 与外部 API、数据库和第三方服务无缝集成
  • 内置错误处理与自动重试机制,保障稳定运行
  • 提供可复用的自动化模板,快速在同类场景部署
🎯 主要使用场景
  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:cargo install(推荐)
cargo install iron-mem

# 方式二:从源码编译
git clone https://github.com/BMC-INC/Iron-mem
cd Iron-mem
cargo build --release
# 二进制在 ./target/release/iron-mem
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 查看帮助
iron-mem --help

# 基本运行
iron-mem [options] <input>

# 详细使用说明请查阅文档
# https://github.com/BMC-INC/Iron-mem
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# iron-mem 配置说明
# 查看配置选项
iron-mem --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export IRON_MEM_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 89/100 含工作流图 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

简介

<p align="center"> <img src="memorylogo.png" alt="IronMem" width="120"/> <br/> <img src="assets/title.png" alt="IRON-MEM" width="300"/> </p>

<p align="center"> <strong>Persistent memory for AI coding assistants.</strong> </p>

<p align="center"> Stop re-explaining your project every time you start a new session. </p>

<p align="center"> <a href="#install">Install</a> &bull; <a href="#how-it-works">How It Works</a> &bull; <a href="#cli">CLI</a> &bull; <a href="#multi-provider-support">Multi-Provider</a> &bull; <a href="#contributing">Contributing</a> </p>

<p align="center"> <img src="https://img.shields.io/badge/built_with-Rust-F74C00?style=for-the-badge&logo=rust&logoColor=white" alt="Built with Rust"/> <img src="https://img.shields.io/badge/MCP-Native-6c5ce7?style=for-the-badge" alt="MCP Native"/> <img src="https://img.shields.io/badge/SQLite%20%2B%20Postgres-003B57?style=for-the-badge&logo=sqlite&logoColor=white" alt="SQLite + Postgres"/> <img src="https://img.shields.io/badge/Docker%20Ready-2496ED?style=for-the-badge&logo=docker&logoColor=white" alt="Docker Ready"/> <img src="https://img.shields.io/badge/license-Apache--2.0-brightgreen?style=for-the-badge" alt="License"/> <img src="https://img.shields.io/github/stars/BMC-INC/Iron-mem?style=for-the-badge&color=yellow" alt="Stars"/> <img src="https://img.shields.io/github/issues/BMC-INC/Iron-mem?style=for-the-badge" alt="Issues"/> <a href="https://github.com/BMC-INC/Iron-mem/actions/workflows/rust.yml"><img src="https://github.com/BMC-INC/Iron-mem/actions/workflows/rust.yml/badge.svg" alt="CI"/></a> </p>

<p align="center"> <img src="https://img.shields.io/badge/works_with-Claude_Desktop-D97706?style=flat-square&logo=anthropic&logoColor=white" alt="Claude Desktop"/> <img src="https://img.shields.io/badge/works_with-Claude_Code-D97706?style=flat-square&logo=anthropic&logoColor=white" alt="Claude Code"/> <img src="https://img.shields.io/badge/works_with-Cursor-000000?style=flat-square&logo=cursor&logoColor=white" alt="Cursor"/> <img src="https://img.shields.io/badge/works_with-ChatGPT_Desktop-10a37f?style=flat-square&logo=openai&logoColor=white" alt="ChatGPT Desktop"/> <img src="https://img.shields.io/badge/works_with-Copilot-2b3137?style=flat-square&logo=github&logoColor=white" alt="Copilot"/> <img src="https://img.shields.io/badge/works_with-Windsurf-06B6D4?style=flat-square" alt="Windsurf"/> <img src="https://img.shields.io/badge/works_with-Zed-000000?style=flat-square" alt="Zed"/> </p>

---

What's New in v0.4.0

Lossless, reversible memory — plus a real memory model: scoping, typed memories, an always-on user profile, and a correction miner.
  • CCR — losslessly reversible memory (Headroom pattern) — every truncated tool output and the verbatim pre-LLM session transcript is preserved in a content-addressed, deduplicated, byte-exact compressed blob store inside the DB. The new retrieve_original tool pulls the exact original back behind any compressed memory. No more lossy truncation.
  • Memory scoping & typed memories (Supermemory patterns) — memories carry a scope (project vs. user/cross-project) and a kind (session, error_solution, preference, architecture, learned_pattern, project_config, profile). Session-start injection ranks project ∪ user memories and boosts durable kinds.
  • remember tool — store an explicit, typed memory in one call (scope, kind, text, tags). User-scope facts follow you into every project.
  • User profile — your cross-project memories are distilled into a single always-injected profile (LLM summary, or a deterministic local rollup when offline). Read/regenerate with get_profile / refresh_profile.
  • Correction miner — error→fix loops in a session (a failing command, edits, then the same command passing) are mined into error_solution memories and surfaced via list_corrections, so past fixes resurface when the work recurs.
  • 18 MCP tools now — adds retrieve_original, remember, get_profile, refresh_profile, list_corrections.
  • Still zero telemetry. Still local-first. Your data stays yours.

<details> <summary>v0.3.0</summary>

- Multi-provider compression — use OpenAI, Google Gemini, or Anthropic as your LLM. Set "provider": "openai" in settings. - Neovim plugin — native Lua plugin with auto session lifecycle, :IronMemSearch, :IronMemStatus - Windows supportinstall.ps1, platform-aware messages, robust home directory detection - Web UI — browse, search, and delete memories at http://localhost:37778/ui - Discovery tools — list known projects, search across all projects, and inspect per-project session history - Still zero telemetry. Still local-first. Your data stays yours. </details>

<details> <summary>v0.2.0</summary>

- 13 MCP tools — session_start, session_end, record_event, compress_session, get_context, get_status, list_memories, search_memories, search_global, list_projects, list_sessions, inject_context, wipe_project - Dual database — SQLite (local, FTS5 full-text search) + Postgres (self-hosted, tsvector) via DATABASE_URL - Every MCP client — Claude Desktop, Claude Code, Cursor, Windsurf, ChatGPT Desktop, Zed, and more - Docker deploymentdocker-compose up for remote/team setups with Postgres - ironmem mcp — new subcommand for direct MCP stdio transport (Claude Desktop/Code) - REST server still works — existing hooks and curl-based workflows unaffected </details>

---

IronMem gives AI coding tools persistent memory across sessions. It silently records what happened during your session, compresses it into concise memory, and injects that context into your next session automatically.

No copy-pasting. No rebuilding context from scratch. No "remember when we refactored auth yesterday?"

Works with every major AI coding tool — Claude Code, Claude Desktop, Cursor, Windsurf, ChatGPT Desktop, GitHub Copilot, Zed, VS Code, and any MCP-compatible client.

Compress with the LLM you already pay for — Anthropic Claude, OpenAI GPT-4o, or Google Gemini. Switch providers with one config change.

Free and open source. Runs locally or on your own infrastructure. No telemetry. No cloud dependency. No subscription. SQLite or Postgres storage. Plain markdown output. Single Rust binary.

<p align="center"> <img src="assets/demo.gif" alt="IronMem in action" width="640"/> </p>

Install

curl -fsSL https://raw.githubusercontent.com/BMC-INC/Iron-mem/main/install.sh | bash

Or clone and build manually:

git clone https://github.com/BMC-INC/Iron-mem.git
cd Iron-mem
chmod +x install.sh
./install.sh

Windows:

git clone https://github.com/BMC-INC/Iron-mem.git
cd Iron-mem
powershell -ExecutionPolicy Bypass -File install.ps1

Add IronMem to your PATH (in ~/.zshrc or ~/.bashrc) and write your API key to IronMem's key file:

export PATH="$HOME/.ironmem/bin:$PATH"          # in ~/.zshrc / ~/.bashrc
echo "your-key-here" > ~/.ironmem/api_key && chmod 600 ~/.ironmem/api_key
Use the key file, not export ANTHROPIC_API_KEY — a global ANTHROPIC_API_KEY makes Claude Code (and similar tools) bill against pay-as-you-go API credit instead of your subscription. IronMem reads ~/.ironmem/api_key automatically.

Restart your terminal and Claude Code. That's it.

Requirements: Rust/Cargo (the installer will tell you if it's missing)

---

MCP Setup

IronMem supports two MCP transports:

  • stdio — for local clients that launch the server themselves (Claude Code, Claude Desktop, Cursor)
  • Streamable HTTP — for remote/cloud clients that connect over HTTP. Uses standard request/response and bearer-token auth, so it works through tunnels and reverse proxies for clients that support static bearer tokens.

Once connected over MCP, IronMem now supports project discovery directly:

  • list_projects — show every project with stored memories
  • search_global — search across all projects
  • list_sessions — inspect session history inside a project

Claude Code MCP Setup

Claude Code connects via stdio — it launches ironmem mcp directly.

Option A: CLI (recommended)

claude mcp add ironmem -- ~/.ironmem/bin/ironmem mcp

Option B: Project .mcp.json (share with your team)

Create .mcp.json in your project root:

{
  "mcpServers": {
    "ironmem": {
      "command": "~/.ironmem/bin/ironmem",
      "args": ["mcp"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key-here"
      }
    }
  }
}
Note: Claude Code hooks (installed by install.sh) and MCP can coexist. The hooks use the REST API for automatic observation recording; MCP gives you direct tool access. You can use both, or just one.

Claude Desktop MCP Setup

Claude Desktop also connects via stdio.

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ironmem": {
      "command": "/Users/YOU/.ironmem/bin/ironmem",
      "args": ["mcp"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key-here"
      }
    }
  }
}

Replace /Users/YOU with your actual home directory path. Restart Claude Desktop after saving.

Cursor / Windsurf MCP Setup

Both use stdio. Add to your MCP settings:

Cursor: Settings → MCP → Add Server

Windsurf: Settings → MCP → Add Server

{
  "ironmem": {
    "command": "~/.ironmem/bin/ironmem",
    "args": ["mcp"]
  }
}

Install Ollama, then pull an embedding model:

ollama pull nomic-embed-text

Docker Deployment

Run IronMem with Postgres for team/remote setups:

ANTHROPIC_API_KEY=your-key docker-compose up --build

This starts IronMem with Streamable HTTP on http://localhost:37779/mcp and Postgres 16, plus the REST server on http://localhost:37778.

---

Quick Start

1. Install IronMem:

   curl -fsSL https://raw.githubusercontent.com/BMC-INC/Iron-mem/main/install.sh | bash
   
2. Add your API key to IronMem's key file:
   echo "your-key-here" > ~/.ironmem/api_key && chmod 600 ~/.ironmem/api_key
   
> Prefer the key file over export ANTHROPIC_API_KEY. Claude Code (and some other tools) bill against ANTHROPIC_API_KEY whenever it's set in your shell — using pay-as-you-go API credit instead of your Claude subscription. The key file keeps IronMem's key out of your environment so it can't change how other tools bill. (IronMem still honors ANTHROPIC_API_KEY if you prefer the env var.) 3. Start coding! IronMem handles the rest silently in the background.

---

Configuration

~/.ironmem/settings.json:

{
  "port": 37778,
  "provider": "anthropic",
  "model": "claude-sonnet-4-6-20250627",
  "inject_limit": 5,
  "max_observation_bytes": 2048,
  "db_path": "/Users/you/.ironmem/mem.db",
  "database_url": null,
  "mcp_transport": "stdio",
  "mcp_sse_port": 37779,
  "auth_token": null,
  "embedding": {
    "provider": "auto",
    "model": null,
    "ollama_url": "http://localhost:11434",
    "weights": { "relevance": 0.5, "recency": 0.3, "importance": 0.2 },
    "recency_half_life_days": 30
  }
}

All fields optional. Sensible defaults provided. auth_token is generated automatically the first time you run ironmem serve without --no-auth. The embedding block is optional — omit it entirely and IronMem behaves exactly as before (keyword-only search, recency injection).

Environment Variables

VariableDefaultDescription
DATABASE_URL_(none)_Postgres URL. Overrides db_path when set.
IRONMEM_MCP_TRANSPORTstdioMCP transport: stdio or sse
ANTHROPIC_API_KEY_(none)_Required when provider is anthropic (default)
OPENAI_API_KEY_(none)_Required when provider is openai
GOOGLE_API_KEY_(none)_Required when provider is google

API Key

IronMem needs an LLM API key to compress session observations into memories.

Recommended (Anthropic): write the key to ~/.ironmem/api_key (echo "your-key" > ~/.ironmem/api_key && chmod 600 ~/.ironmem/api_key). Keeping it in this file rather than a global ANTHROPIC_API_KEY export avoids changing how other tools bill — Claude Code, for instance, charges pay-as-you-go API credit whenever ANTHROPIC_API_KEY is set in the environment, instead of using your subscription. IronMem reads the file automatically (it also works when the background server is spawned via nohup, where some shells strip env vars from child processes).

IronMem still honors the per-provider environment variable if you prefer it — ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_API_KEY. The file fallback applies to the default Anthropic provider.

---

Check if the API key is accessible (the key file is the recommended source)

cat ~/.ironmem/api_key # Should contain your key echo $ANTHROPIC_API_KEY # Optional env-var fallback (may be empty)

Neovim Plugin

IronMem includes a native Neovim plugin that communicates via MCP stdio.

Install with lazy.nvim:

{
  "BMC-INC/Iron-mem",
  config = function()
    require("ironmem").setup({
      -- binary = "~/.ironmem/bin/ironmem",  -- default
      -- auto_start = true,   -- session_start on VimEnter
      -- auto_end = true,     -- session_end on VimLeavePre
      -- record_events = true, -- record buffer writes
    })
  end,
}

Commands:

CommandDescription
:IronMemStartManually start a session
:IronMemEndEnd session and compress
:IronMemStatusShow database stats
:IronMemSearch <query>Search memories in a split buffer

---

Before vs after

Without IronMem:

"We already changed the auth middleware, switched to JWT, updated the migration, and fixed the failing tests in billing. Let me explain the whole thing again."

With IronMem:

Open a new session. Your assistant already has the recent project context.

---

Troubleshooting

Server not starting:

ironmem status                           # Check if server responds
cat ~/.ironmem/server.log                # Check server logs
~/.ironmem/bin/ironmem server            # Run manually to see errors

Observations not being recorded:

ironmem status                           # Check observation count
sqlite3 ~/.ironmem/mem.db "SELECT count(*) FROM observations;"

If count stays at 0, your hooks may not be installed. Re-run ./install.sh or check that ~/.claude/hooks/post-tool-use.sh exists and is executable.

Compression failing (memories always 0):

```bash

🎯 aiskill88 AI 点评 B 级 2026-06-06

创新的会话记忆解决方案,解决AI助手长期对话的上下文丢失问题。Rust实现保证性能,但生态成熟度有限,适合早期采用者。

📚 实用指南(长尾问题)
适合谁
  • 需要 Iron-mem 解决具体问题的开发者与运营人员
最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
部署方案
  • CLI:直接 npm install -g / pip install,命令行调用
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
Iron-mem 中文教程Iron-mem 安装报错怎么办Iron-mem 与同类工具对比Iron-mem 最佳实践Iron-mem 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要 Iron-mem 解决具体问题的开发者与运营人员
⭐ 最佳实践
  • 先在测试环境跑通最小用例,再接入生产数据
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)

👥 适合人群

自动化工程师和运维人员项目经理和业务分析师希望减少重复性工作的专业人士数字化转型团队

🎯 使用场景

  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同

⚖️ 优点与不足

✅ 优点
  • +Apache-2.0 协议,可免费商用
  • +大幅减少重复性人工操作
  • +可视化流程,清晰直观
  • +可扩展性强,支持复杂场景
⚠️ 不足
  • 初始配置和调试需投入一定时间
  • 强依赖外部服务的稳定性
  • 复杂场景需具备一定技术基础
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

主要支持Claude Code和GitHub Copilot,可扩展集成其他助手。
💡 AI Skill Hub 点评

AI Skill Hub 点评:铁记忆 的核心功能完整,质量良好。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ Apache-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 铁记忆
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 Iron-mem
原始描述 开源AI工作流:Persistent session memory for AI coding assistants. IronMem silently records you。⭐5 · Rust
Topics AI编码会话记忆上下文管理CLI工具Rust实现
GitHub https://github.com/BMC-INC/Iron-mem
License Apache-2.0
语言 Rust
🔗 原始来源
🐙 GitHub 仓库  https://github.com/BMC-INC/Iron-mem 🌐 官方网站  https://execlayer.substack.com/p/i-open-sourced-ironmem-persistent

收录时间:2026-06-06 · 更新时间:2026-06-11 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。