Agentpack

io.github.ihorponom由 GitHub 账号 ihorponom 发布v1.11.1更新于 Oct 25, 2026

Repo-native task continuity for AI coding agents: a reviewed task-state ledger served over MCP.

已验证STDIO仅桌面知识与记忆开发者工具

概览

AI 生成的概览

本地 MCP 服务器,把 AI 编码任务的状态保存在仓库的 .agentpack/ 目录中,让新会话能接着上次的进度继续。

可以做什么
  • 会话开始时加载精简的任务摘要:当前 Task Passport、近期检查点、决策与源码结论
  • 工作过程中记录决策、走过的死路、验证证据,以及带文件哈希的源码结论
  • 在自然停顿处创建检查点,包含状态、后续动作与 Git 状态
  • 管理任务生命周期:开始、搁置、切换与结束任务,支持多仓库与 monorepo 的写入范围
  • 导出与导入任务包,并通过只读终端视图与用量报告查看状态
适用场景
适合长时间编码任务被压缩或中断、在 Claude Code、Cursor、Codex 等不同 MCP 客户端之间切换,或几天后回到某个重构、缺陷修复时,希望代理直接续做而不是重新排查。
运行要求
需要 Node.js 20 或更高版本,并全局安装 agentpack-cli npm 包;在本地仓库执行 agentpack init,并按客户端执行安装步骤(codex、claude、cursor 或 claude-desktop)。未声明需要账号、API 密钥或网络访问。
安装前请注意
安装程序会写入客户端配置与指令文件,例如 .mcp.json、AGENTS.md、CLAUDE.md,并向 .git/info/exclude 添加条目。可选的钩子与提交前任务门禁会发出警告,在 block 模式下还会阻止超出任务写入范围的编辑;文档称钩子只是护栏而非沙箱。存储的上下文对疑似密钥的值仅做尽力脱敏,请检查写入仓库的内容。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Agentpack,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Agentpack

[npm version] [CI] [node] [license] [agentpack MCP server]

Repo-native task continuity for AI coding agents.

Agent memory remembers how you work. Agentpack remembers where the task stands.

Your agent spent an hour on a task. It found the cause, rejected two approaches, and wrote down the next step. Then the context was compacted, or the chat closed. The next session starts from zero and does the same investigation again.

Agentpack keeps the task state in your repo. Connected agents record the goal, decisions, dead ends, verification evidence, and checkpoints in .agentpack/ while they work. Then the next session loads that state and continues: the same agent after compaction, a different client, or you next week.

[How Agentpack works: an agent records task state into .agentpack/ in the repo, and any next session, whether the same agent, another client, or later, continues from it]

Here it is in action. In session 1, an agent works on a flaky test and records a decision, a dead end, and a checkpoint through the Agentpack MCP tools. In session 2, the next day with an empty context, one load_context call brings the task back:

[Demo: an agent records a decision, a dead end, and a checkpoint through Agentpack MCP tools, then a new session the next day loads the task state with one call]

▶ Watch the 80-second explainer, with sound

To try the same flow by hand from the CLI, see docs/DEMOS.md.

  • Local-first. Plain files in your repo. No cloud, no telemetry, no network calls.
  • Made for agents. A local MCP server and generated project instructions (AGENTS.md, CLAUDE.md, Cursor rules) tell agents when to load and record state.
  • Open to people. The CLI shows the same state, so you can inspect it, fix it, or hand it off yourself.

How is this different from agent memory?

Claude Code memory, Codex memories, and CLAUDE.md or AGENTS.md keep how to work: your preferences, project conventions, and facts that stay true. Agentpack keeps where the work is: the goal of the current task, its constraints, decisions, dead ends, next actions, and verification result.

Agent memoryAgentpack
HoldsPreferences, conventions, long-lived factsThe state of one task
Lives inThe profile or account of one client.agentpack/ in the repo, local by default, portable with task bundles
Read byThat client onlyAny MCP client: Claude Code, Codex, Cursor, Claude Desktop
ShapeFree-form notes, recalled by relevanceA Task Passport per task: goal, lifecycle, the paths it may change, and verification bound to a commit
StalenessNot tied to file changesNotes about files store the file hash, so Agentpack flags a note when its file changes

Use both. Memory keeps how you like to work. Agentpack keeps what the task needs next.

Quick start

Agentpack needs Node.js 20 or later.

bash
npm install -g agentpack-cli
cd path/to/your/repoagentpack init                     # once per repoagentpack install claude --write   # per client: codex | claude | cursor | claude-desktopagentpack install git-hooks --write  # optional: task gate check before each commit

Restart or reconnect your coding agent, and approve the Agentpack server or hooks when the client asks. From then on, the agent loads the task state when a session starts, records decisions and evidence while it works, and creates checkpoints at meaningful points.

To check the setup, run agentpack doctor. To see the task state yourself, run agentpack resume --preset agent --query "<topic>".

In a Git repository, init adds the local Agentpack files to .git/info/exclude. The list includes .agentpack/, .mcp.json, .claude, .codex, .cursor, AGENTS.md, and CLAUDE.md. Agentpack does not change your .gitignore. Files that Git already tracks stay tracked.

For each client, docs/INTEGRATIONS.md shows what the installer writes and why.

How it works

  1. When a session starts, the agent loads a compact summary: the current Task Passport, recent checkpoints, decisions, and source conclusions.
  2. While it works, the agent records what is worth keeping: decisions, failed approaches, and verification evidence. It can also record a source conclusion: a short note about what a file does, stored with the file hash. If the file changes later, Agentpack flags the conclusion. A matching hash shows that the file is unchanged, not that the conclusion is correct.
  3. At a natural stop, the agent creates a checkpoint with the status, the next actions, and the Git state.
  4. The next session, in any MCP client, continues from that state. It does not rebuild the task from chat history.

Each task has a Task Passport: the goal, status, constraints, write scope (the paths the task may change), next actions, and verification. You can start, park, switch, and finalize tasks, so each handoff is explicit.

The task gate checks edits against the current Passport. The client installers add native hooks for Claude Code, Codex, and Cursor. install git-hooks adds a pre-commit check. By default, the gate only warns. Set "gateMode" in .agentpack/config.json to "block" to stop edits outside the write scope or outside an active task, or to "off" to turn the gate off. Hooks are a guardrail, not a sandbox. See docs/CLI.md.

The summary stays inside a token budget. The agent gets the useful state back, not the full history.

More features

  • Task bundles. Export a task to one JSON file, and import it in a fresh clone or on another machine. See docs/TASK-PASSPORT.md.
  • Tasks across repositories. One Passport can cover changes in several repositories, each with its own write scope.
  • Monorepo focus. Give each part of a monorepo (api/, frontend/, cron/) short tasks with their own write scope. The task gate warns when the agent leaves that part.
  • Usage reports. agentpack usage report reads local Claude Code and Codex transcripts and shows the token use of a task, including the Agentpack share. Nothing leaves your machine.
  • Read-only inspector. agentpack tui shows tasks, evidence, and checkpoints in the terminal. See docs/TUI.md.
  • Builder subagent. Codex, Claude Code, and Cursor installs include an optional builder for larger implementation work. The main agent says what it will hand off before it uses the builder. Small tasks stay with the main agent.

When it helps

  • The context is compacted in the middle of a task, and the next turn needs the state back.
  • You start a new chat on a task that is still open.
  • You change between Claude Code, Cursor, Codex, or another MCP client.
  • You come back to a refactor or a bug fix days later.
  • Another agent continues from your checkpoint.

Agentpack context also uses tokens. The compact output keeps the task state available without the full ledger history.

Security posture

  • Zero runtime dependencies, exact dev dependencies, a committed lockfile, and ignore-scripts=true.
  • No telemetry and no network calls in normal CLI or MCP operation.
  • Best-effort redaction of values that look like secrets in stored context and handoff output.
  • GitHub Actions publishes each release with npm provenance (Trusted Publisher, no long-lived tokens). To verify, run npm audit signatures.

See SECURITY.md for the full policy, including what Agentpack reads outside the repo.

Documentation

Contributing

Clone the repo and use Node.js 20 or later:

bash
npm ci --ignore-scriptsnpm testnpm run mcp:smokenode dist/src/agentpack.js --help

See docs/SETUP.md for the development setup and docs/RELEASING.md for the release steps.


Mirror: Codeberg. Issues, releases, and npm provenance stay on GitHub.

来源:README.md,提交 4faf87d

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

11
  1. v1.11.1最新Oct 25, 2026
  2. v1.11.0Oct 17, 2026
  3. v1.10.0Oct 10, 2026
  4. v1.9.1Oct 5, 2026
  5. v1.9.0Oct 4, 2026
  6. v1.8.1Oct 3, 2026
  7. v1.7.0Oct 3, 2026
  8. v1.6.8Sep 30, 2026
  9. v1.6.6Sep 27, 2026
  10. v1.6.5Sep 16, 2026
  11. v1.6.4Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分