heropen — AI Agent Memory

net.heropenPublished by heropen.netv2.0.8Updated Oct 30, 2026

Persistent memory for AI agents: local-first MCP server, zero-config. No cloud, no API keys.

The publisher's own server: Memory.fit

VerifiedSTDIODesktop onlyKnowledge & MemoryAI & ML

Overview

AI-generated overview

Local-first long-term memory for AI agents: stores, searches and prunes memories in a local SQLite database, with time context and session checkpoints.

What you can do
  • Search, add, update and list long-term memories, with vector, full-text and fuzzy fallback
  • Prime each conversation with local time, time-of-day and gap since the last session
  • Auto-save conversation turns and ingest existing local client session logs, then check or flush pending turns
  • Save and recover session checkpoints to resume after context compression or restart
  • Check system health and connection status
When to use it
Useful when you want an assistant to remember preferences, projects and past decisions across sessions without a cloud service, and to keep a sense of time and continuity between conversations. Suits users who prefer their memory data to stay on their own machine.
Requirements
Runs as a local stdio process, installed from PyPI (pip install heropen, or uvx) and started via the heropen-mcp entry point. Python is required; optional extras add local embeddings or a Windows tray badge. No API key or account is needed; an optional self-hosted embedding endpoint can be set through EMBEDDING_ENDPOINT and EMBEDDING_API_KEY. Data is stored under the local ~/.heropen directory.
Before you install
The server asks assistants to call its tools at every conversation start and after every reply, which adds context and tool calls to each session. It writes conversation content into a local database and can read existing local client session logs on disk. There is no delete function, so stored memories persist unless the SQLite files are removed manually. Optional embedding extras download a model; a self-hosted endpoint configured via EMBEDDING_ENDPOINT and EMBEDDING_API_KEY sends text to…

Installation

In SourceWeft

  1. Open heropen — AI Agent Memory in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

heropen

[M8ven Verified]

English · 简体中文

Built to solve forgetting. The more you use it, the better it knows you.

A local-first memory system for AI agents. Memories live on your own machine — never uploaded, never synced, never taken away. heropen organizes and prunes them automatically, so retrieval gets sharper and more personal over time.

⭐ Did this help you? Give us a star → ★ Star in the top right, so more agent users find it.

In 30 seconds

  • One-line install: pip install heropen. No Docker, no Postgres, no API key. Common clients get their MCP config written automatically; Hermes and similar require wiring up heropen-mcp by hand.
  • Your agent gains long-term memory: it remembers people, events, and context across sessions — no more starting from zero every conversation.
  • Data stays 100% on your machine: no telemetry, no cloud sync, no bills. Memories live on your disk, and only you can take them away.

Install

bash
pip install heropen                 # Core: MCP + full-text search, pure-Python deps, any architecture (incl. ARM64)pip install 'heropen[embedding]'    # Optional: local embeddings (pulls in onnxruntime / fastembed)pip install 'heropen[tray]'         # Optional: Windows system tray badge (always-visible presence + workbench)

ARM64 notes

PlatformRecommendation
Apple Silicon (macOS arm64)Usually pip install 'heropen[embedding]' just works
Windows ARM64Same; make sure Python is an ARM64 build
Linux aarch64Install core first, then try embedding. If no onnxruntime wheel matches, point EMBEDDING_ENDPOINT at a self-hosted endpoint or use FTS only

Without local embeddings, search / recall degrade gracefully to full-text search — memory storage and retrieval keep working.

Restart your agent — done. On first launch heropen probes the known config paths of common clients (Claude Code, Cursor, Windsurf, WorkBuddy, etc.) and registers the memory tools. Custom mcp_servers setups like Hermes are not written automatically; follow "Connect your agent" below to configure them by hand.

Quick start in 30 seconds

bash
heropen add "Project uses FastAPI + SQLAlchemy, tests run on pytest"   # store a memoryheropen search "project tech stack"                                    # search memoriesheropen status                                                         # check statusheropen diagnose                                                       # diagnose problems

How to make it actually stick: read the official usage guide (single source of truth) — docs/usage-ssot-zh.md (Chinese). The short version: only facts go into heropen; the hot layer holds iron rules, high-frequency items, and pointers; start every session with prime, then search; free-form tags are the primary mechanism.

The first add does not download the ~95 MB embedding model — writes go straight to full-text search. When you want local semantic retrieval, run it explicitly:

bash
pip install 'heropen[embedding]'heropen embed          # download the model and generate embeddings for existing entries

Connect your agent (MCP)

Use the dedicated heropen-mcp entry point (stdio). heropen mcp also works, but prefer the form below in MCP client config:

json
{  "mcpServers": {    "heropen": { "command": "heropen-mcp", "args": [] }  }}

If heropen-mcp is not on your PATH (e.g. uv tool install into an isolated environment), replace command with the absolute path inside that environment.

For Claude Code / Cursor / Windsurf / WorkBuddy: heropen auto-setup attempts to write the known config paths. For Hermes and other custom config formats, add the block above to your own mcp_servers and restart the agent.

Restart your agent and it has memory. Store a bug fix once, and it is remembered permanently across sessions.

Tray badge (Windows system tray, heropen[tray])

With heropen[tray] installed, run heropen tray to pin a native heropen icon in the taskbar tray (same area as WeChat / Bluetooth / IME) — it covers no window content. It solves the problem of "a memory system with no presence, easily mistaken for junkware and uninstalled."

bash
pip install 'heropen[tray]'   # Windows onlyheropen tray                  # start the badge (auto-starts on boot by default)

Right-click menu:

ItemWhat it does
Status lineRunning · Free / Plus · N agents · N memories
Version vX.Y.ZOpens the changelog
Storage mode (per agent)Each agent independently picks bulk store / per-turn store / auto-detect
Open workbenchLeft-clicking the icon does the same — opens the live-data workbench page
Open homepageOpens heropen.net
Check for updatespip install -U heropen
Start on bootToggle (on by default; writes to the registry Run key)
Restart / QuitRestart to load the latest code / exit completely

Hovering the icon shows four pieces of self-explanatory status: identity (heropen agent memory system), storage mode, entries stored, and days in use.

Real data, no fabrication: the badge and workbench read the actual entries table from your local ~/.heropen/*.db. Nothing is hardcoded. When no database is readable it shows "no data / 0" and never invents numbers (--mock is for demos only). It reflects only the local database — memories from another machine (say, another agent on a different computer) do not appear here, which is expected (each machine's badge is independent).

Storage modes (wired into the core): the three modes control how often and at what granularity memories are committed to heropen — bulk store batches them, per-turn store writes each turn, and auto-detect picks intelligently based on trigger words such as "remember / decided / path / preference". Set per agent. The mode only governs commits — not retrieval, not what the tray displays; what gets written is still the local fact store. See docs/2.0-开场签名与存储内核.md (Chinese).

Interface languages (since 2.0.4): the tray menu's "Language" item switches between 简体中文 / English / 日本語 / 한국어 / Español / Français / Deutsch / Português / Русский. Menus, hover tooltips, notifications, and the workbench page switch instantly, and the choice persists locally (~/.heropen/_tray_state.json).

No delete feature: the badge, the workbench, and the CLI expose no deletion entry point whatsoever.

Opening signature

Before every conversation starts — before the agent actually begins working — heropen drops a single status line into context. You don't type a command, and you don't open a panel:

heropen ready · 187 local memories · ~3 hours since last conversation · agent=xiaokai

It is attached to the beginning of the MCP prime_conversation return value (the CLI bootstrap prints it too).

Presence in 2.0 = opening signature + tray: the signature covers "you see it while chatting", the tray covers "it's in your taskbar even when you're not."

Why heropen

heropen (free)Other options
StorageUnlimitedUsually capped
RetrievalUnlimitedMetered per call
Network requiredNoYes
Data ownershipYour machineTheir servers
InstallOne pip installServer + configuration

Free = the complete core feature set, with nothing crippled.

The position heropen holds

Local-first is not unique to heropen — a dozen similar projects run SQLite + MCP. What heropen genuinely holds, and others have not yet taken, is three things:

  • Private-domain / shared-domain layering across multiple agents. The free tier gives you 8 fully private agents (high-frequency always-on agents like Hermes and WorkBuddy each get an isolated database), plus an optional shared domain (_shared) for exchanging knowledge between agents on demand. Free and Plus differ in capability, not count (Plus adds real features such as skill collection and sharing). Most competitors offer only a single flat namespace.
  • Time awareness before a conversation (since v1.8.7). At the start of each session the agent automatically receives local time, the time-of-day word, the interval since the last conversation, and whether a sleep cycle was crossed — a temporal baseline on the interaction side that nobody else provides.
  • A zero-dependency install surface. One line of pip install heropen, with no Docker, no Postgres, and no Ollama.

Privacy commitment

Your data stays on your machine. No telemetry. No heartbeat ping. All memories live in a local SQLite database. Vector retrieval uses a local embedding model by default (fastembed; pip install heropen[embedding]) — fully offline and free. You can also point the EMBEDDING_ENDPOINT and EMBEDDING_API_KEY environment variables at your own self-hosted embedding endpoint (OpenAI-compatible /v1/embeddings), so you never pay a third-party cloud.

If neither local embeddings nor a self-hosted endpoint is configured, search falls back to fast full-text (FTS) matching — still fully offline and free. pip install heropen works with zero configuration; embeddings only improve retrieval quality and never block basic use.

Local capabilities stay local (currently): in the current version, local memory read/write, retrieval, and panel capabilities will not be migrated into services that require network access; capabilities already available in the free tier will not be reduced in later versions.

Why local

When memory is turned into a cloud primitive, your conversation history and working context end up on someone else's servers. heropen chooses the opposite: memories are written to ~/.heropen/, one SQLite file per agent, and the data never leaves your machine.

What the cloud gives you is convenience; what local gives you is that only you can take it away.

The memories are yours

Memories live in your local ~/.heropen/ directory, one SQLite file per agent. At any time you can:

  • Back up / export: heropen export dumps all memories to a local JSON file (heropen import reads it back in);
  • No delete feature: heropen provides no delete / clear entry point — memories are locally under your control and exportable, but there is deliberately no "delete" button anywhere, to prevent unrecoverable mistakes (there is no cloud copy; deleted means gone). If you really need to clean up, simply remove the corresponding SQLite file under ~/.heropen/ — no need to go through us, and no network required.

A friendlier Markdown + YAML export (human-readable, lossless round-trip, re-importable) is on the roadmap.

How to choose

When choosing a memory solution, don't look only at recall — look at five things:

  1. Deployment cost: does one pip install get it running, or do you need Docker / Postgres / Ollama / an API key?
  2. Dependencies and cost: does the write path burn LLM tokens? Are there zero external dependencies?
  3. Portability: can memories be exported as readable files, carried elsewhere, and re-imported?
  4. Secure defaults: does the listening port bind to loopback or 0.0.0.0 by default? Is it telemetry-free?
  5. Engineering tax: are write discipline and invalidation mechanisms clear? Is it compatible with prompt caching? How are cross-model capacity limits handled?

Run heropen doctor and it self-checks all five, giving each a pass / notice / warning verdict.

Versions and positioning

VersionPositioningWho it's for
FreeDoes the one thing — memory — well: local, private, better the more you use itAnyone who wants long-term memory for their agent, running on their own machine
PlusGreat memory + serving your work: the first feature is skill collection and sharing, so what you've remembered is reused across agentsSolo founders / indie developers willing to pay for continuous new features
EnterpriseA memory foundation for many employees × many customers (self-hosted + isolation + audit)Organizations where many employees serve many customers

The free version is fully open source (Apache-2.0); Plus / Enterprise are closed source.

Compliance statement

heropen is a local-first memory and context tool: your data always stays on your machine, fully under your control. The local-first architecture inherently satisfies requirements around user data control and transparency — its operation is transparent and controllable to you.

Open-source scope

The free version is fully open source (Apache-2.0). The commercial layer (Plus / Enterprise) is closed source.

Links & support

⭐ If you like it, star it — that's the biggest support you can give us: click ★ Star.

Roadmap

  • Currently focused on desktop, local use. Mobile / cross-device sync is out of scope for now — it conflicts with the default promise that "data never leaves your machine". If it is ever built, it will necessarily take the form of user-owned storage + end-to-end encryption + off by default.
  • Markdown + YAML memory export (lossless round-trip).
  • More productized private-domain / shared-domain capabilities across agents.

License

Apache-2.0

Source: README.md at commit 1ae000b

Tools

12

search_memory

搜索用户的长期记忆。在以下情况必须调用: - 对话开始时,了解用户背景和历史 - 用户提到人名、项目名、偏好等关键词时 - 用户询问"还记得吗"或类似问题时 不要等用户要求才搜索。主动搜索能让你更懂用户。三层回退:向量 → 全文 → 模糊匹配。 Args: query: Keywords to search for. Use the user's own words or inferred topics. limit: Max results (1-20, default 5). agent: Which agent's memory to search (default: auto). date_from: Only return entries on or after this date (YYYY-MM-DD). date_to: Only return entries on or before this date (YYYY-MM-DD).

Parametersagentlimitqueryrequireddate_todate_from

prime_conversation

对话开始前必须调用:获取当前时间上下文(heropen 自动生成)。 返回自然语言时间区块,包含:当前本地时间、时段词、距上次对话间隔、 是否跨睡眠周期(区分"工作-短休息-工作"与"工作-长休息-继续工作")、 今日对话轮次、以及相对时间词锚点提示。 把这段文本作为上下文读入,你的寒暄与对"明天/下周"等相对时间的理解才有据可依, 不会出现"晚上说早上好"或把用户凌晨说的"明天"误判为字面次日。 返回内容开头会带一行「开场签名」(品牌 + 状态),形如: heropen 已就绪 · 本地记忆 187 条 · 距上次对话约 3 小时 · agent=xiaokai Args: agent: Which agent's context to prime (default: auto).

Parametersagent

add_memory

保存信息到用户的长期记忆。在以下情况必须调用: - 用户分享了新的偏好、习惯、约定、项目信息 - 对话中产生了需要后续跟进的事项 - 对话即将结束时,保存本次产生的关键信息 优先主动保存,不要等用户说"记住这个"。content 上限 5000 字。 Args: section: Category/topic for this memory (e.g. '用户偏好', '项目状态', '对话记录'). content: The information to remember (max 5000 chars). Write it clearly so future you can understand it. tags: Comma-separated keywords for better search. agent: Which agent's memory to write to (default: auto). entry_date: Date for this entry (YYYY-MM-DD, default: today).

Parameterstagsagentcontentrequiredsectionrequiredentry_date

auto_save_turn

宿主在每轮 assistant 回复完成后调用一次;事务式接收完整话轮。 自动模式按重要内容或累计信息量触发写入,最迟十轮;十轮模式累计十轮;每轮模式立即保存。 只有实际调用才会计数,不会自行读取对话。待存轮持久化于数据库,不触碰旧 JSON。 source 固定 auto_turn;不自动追加标签。请勿用本工具替代断点(session_checkpoint)。 Args: content: 本轮 assistant 回复原文;与用户输入合计超过 1,000,000 字符会拒绝,不截断。 agent: 哪个 agent 的记忆(默认自动)。 user_content: 可选,本轮用户输入原文。 section: 原始分类(默认空字符串)。 tags: 原始标签(默认空字符串,原样保存)。 conversation_id: 批次隔离标识,不是读权限隔离;空字符串为独立默认会话。 turn_id: 当前会话内稳定的话轮标识,重试必须复用且保持 conversation_id 不变。 省略时生成 ID,须复用返回的 turn_id 重试;无 ID 重试无法幂等。 同 ID 同请求返回 duplicate,同 ID 不同正文或元数据会拒绝。 Returns (JSON): saved / parts (int): 本次新建 entries 数;parts 不是列表。 flushed (int): 本次关联到 entries 的轮数,不是条目数。 received_turns (int): 当前会话累计接收轮数,重复请求不增加。 pending_turns (int): 当前会话待存轮数。 buffered (bool): 当前轮是否仍待存,不是待存轮数。 duplicate (bool): 是否为重复话轮;entry_id 为当前轮关联条目或 null。 entry_ids (list[int]): 本次新建条目 ID。 conversation_id / turn_id (str): 会话与话轮标识。 generated_id (bool) / idempotency_warning (str): ID 生成情况及重试提示。 configured_mode / mode / reason (str): 配置模式、本轮判定模式及原因。 last_received_at (str | null): 当前会话最近接收时间。 source 固定 auto_turn,embedding / graph 为 deferred。 助手回复为空时 skipped=true,不计为完整轮。

Parameterstagsagentcontentrequiredsectionturn_iduser_contentconversation_id

ingest_local_turns

主动读取本机客户端会话记录,把真实完整话轮补交给轮次存储。 适用场景:宿主没有在每轮回复后调用 auto_save_turn,导致自动累计空转 (received_turns 恒为 0)。本工具不需要宿主配合,直接读取客户端已写在 磁盘上的会话记录;不修改客户端配置、不安装钩子、不改动客户端数据。 只使用记录里原生存在的会话与轮次标识作为幂等键,因此可安全重复调用, 不会重复计数;用户输入与助手回复均取自记录原文,不会生成或补造内容。 注入块(system-reminder、task-notification、浏览器上下文等)不是用户 发言,已剔除;只有除注入块外没有真实用户输入、或没有助手回复的轮次会 被跳过,绝不伪造。 Args: source: "all"(默认,读取所有已知客户端)、"zcode" 或 "workbuddy"。 apply: 默认 False 只统计不写入(可先看将要提交多少轮);True 才真正提交。 include_subagents: 是否一并读取子代理会话(默认否,子代理对话通常非人类主会话)。 Returns (JSON): considered / submitted / skipped_incomplete (int): 候选 / 提交 / 跳过轮数。 duplicate / saved / buffered (int): 重复未计数 / 本次新建条目 / 仍待存轮数。 per_source (dict): 按客户端分别返回上述计数,便于定位哪一端读到了多少。 conversations 在单选来源时返回按会话的计数,用于核对第 1—9 轮递增、 第 10 轮存档。 source / apply (str | bool): 数据来源与实际是否写入。

Parametersapplysourceinclude_subagents

turn_storage_status

只读查询 agent 的事务式话轮存储状态;不创建数据库、不初始化 schema、不刷新待存轮。 返回 JSON:database_exists (bool)、received_turns / pending_turns / saved_turns (int) 为该 agent 全部会话的累计接收 / 待存 / 已存轮数,buffered (bool) 表示是否有待存轮。 conversations 按 conversation_id 返回各会话上述计数和 last_received_at。 conversation_id 仅用于批次隔离,不是读权限隔离;此工具可查看该 agent 的全部会话计数。 不读取、迁移或删除旧 JSON 缓冲。

Parametersagent

flush_turns

显式保存指定会话的全部待存尾批,即使不足十轮;不修改其他会话或旧 JSON。 Args: agent: 哪个 agent 的记忆(默认自动)。 conversation_id: 批次隔离标识,不是读权限隔离;空字符串仅刷新默认会话,非全部会话。 Returns (JSON): saved / parts (int): 本次新建 entries 数;flushed (int): 本次写入关联的轮数。 received_turns / pending_turns (int): 当前会话累计接收 / 剩余待存轮数。 buffered (bool): 当前会话是否仍有待存轮;entry_ids (list[int]): 本次新建条目 ID。 conversation_id (str): 本次刷新会话;其余状态字段由事务引擎原样返回。

Parametersagentconversation_id

update_memory

Update an existing memory entry. Only provided fields are changed.

Parameterstagsagentcontentsectionentry_idrequiredentry_date

list_memory

列出用户的记忆列表。用于概览已有记忆、检查冗余、了解记忆总量。 Args: limit: How many recent entries to show (max 50, default 10). agent: Which agent's memories to list.

Parametersagentlimit

health

Check heropen system health and connection status. Call this when you start up to verify everything is working. If pending_setup is true, it means heropen was just installed — show the welcome_message to the user and ask if they'd like to complete the setup. Args: clear_pending: Set to true after completing initial setup to clear the pending marker.

Parametersclear_pending

session_checkpoint

Save a session checkpoint. Call periodically during long conversations so the agent can recover context after compression or restart. Args: agent: Which agent's memory context_summary: Summary of current conversation context active_task: What task is currently being worked on key_decisions: Comma-separated key decisions made so far tags: Extra comma-separated tags

Parameterstagsagentactive_taskkey_decisionscontext_summary

session_recover

Recover the most recent session checkpoint(s). Use after context compression or agent restart to pick up where you left off. Args: agent: Which agent's memory limit: Number of recent checkpoints (default 1, max 5)

Parametersagentlimit

Version history

6
  1. v2.0.8LatestOct 30, 2026
  2. v2.0.7Oct 26, 2026
  3. v2.0.6Oct 23, 2026
  4. v2.0.5Oct 22, 2026
  5. v2.0.0Oct 6, 2026
  6. v1.9.6Sep 21, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Memory integrations