Skip to main content
Glama

unblock

一个队列,汇集你的智能体需要你提供的一切。

当智能体碰壁,遇到只有人类才能清除的障碍——一个 API 密钥、一次控制台点击、一项 OAuth 授权、一个审批——它会登记一项结构化请求,然后要么继续工作,要么挂起等待。你可以在一个页面上批量回答这些请求(秘密也包括在内),挂起的智能体会随之醒来。

你永远不需要为了弄清楚智能体想要什么而翻看对话记录。

为什么存在

每一种面向智能体的人工介入工具,都只解决了这个问题的三分之一。LangGraph 的 interrupt() 拥有正确的等待语义,却不附带队列或界面。HumanLayer 和 gotoHuman 提供结构化请求,并通过 SaaS 进行路由。本地 MCP 提问服务器是单智能体、同步式的,会把答案直接从工具结果中传回——而 API 密钥恰恰绝不能出现在那里。

unblock 将三者合而为一:本地优先,秘密留在模型上下文之外,以及机器上所有智能体共享的同一个队列。

Related MCP server: human-loop-mcp

工作方式

只有两个调用,而且只有一个会停下智能体。

调用

是否阻塞?

同时数量

unblock_file

否——返回一个工单,智能体继续工作

不限

unblock_park

是——保持挂起,直到被回答

每个智能体一个

正是这一约束让部分回答变得安全。回答一个已登记的请求不会打断任何东西,因此你可以按任意顺序回答。回答挂起中的请求会唤醒智能体,而它会收集自己不在期间到达的所有已登记回答。

一个需要三样东西的智能体,会声明一次包含三个字段的挂起。它不会挂起三次,因为它只能在一个地方被停下。

秘密

在表单中键入的秘密永远不会沿那条进入模型上下文的通道回传。守护进程会存储它,并把一个引用交给智能体:

op://Private/abc123/credential        # 1Password — masks the value if printed
ub_9cjp4t-stripe_key                  # macOS keychain
$UNBLOCK_STRIPE_KEY                   # env file, 0600

智能体在需要时解析该引用,并且绝不会将它打印出来。当 op 已登录时,优先使用 1Password,因为 op run 会遮蔽该值,即使子进程将其回显也一样——这是唯一具备这种保护能力的后端。

安装

npm install -g unblockd         # daemon, MCP server, CLI (binary: unblock)
unblock daemon start

然后让某个智能体指向它。对于 Claude Code:

claude mcp add unblock -- npx unblockd mcp

再安装该技能,让智能体知道何时挂起:

npx skills add aneym/unblock --skill unblock -g

herdr

herdr plugin install aneym/unblock --yes

alt+p u 会打开 unblock 模式:一个显示完整队列的放大窗格,限定于当前活动的 profile,并可直接在窗格内作答。回答会在智能体所在的窗格中唤醒它。

该插件还会列出 herdr 检测到已受阻但从未声明过请求的智能体——列在已声明请求的下方,因此静默卡死仍然可见。

用手机回答

unblock link 会生成一个临时 URL。它在你提交后即失效,并会按计时器到期,因此你口袋里的旧标签页到明天不会仍然有效。通过你自己的 tailnet 来提供服务;如果没有 tailnet,可以使用快速隧道:

tailscale serve --https=8799 127.0.0.1:4488     # tailnet only
cloudflared tunnel --url http://127.0.0.1:4488  # no account

布局

src/schema.js    ask + field validation, the profile rule
src/store.js     SQLite queue, one-park-per-agent, drafts, links
src/secrets.js   1Password -> keychain -> env file
src/daemon.js    HTTP API, the answer page, SSE
src/mcp.js       MCP server: file / park / check / cancel
web/             the answer page
plugin/          herdr plugin
skills/unblock/  the discipline agents follow before parking

零 npm 依赖。队列就是位于 ~/.local/state/unblock/queue.db 的一个 SQLite 文件。

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to ask clarification questions and receive structured user input through a Human-in-the-Loop interface.
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI agents to ask human operators questions through polished browser dialogs, supporting text/choice/confirmation inputs and file attachments.
    7
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to request human decisions for subjective or high-stakes choices through MCP tools like ask_human and provision_api_key.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides durable queues, human-in-the-loop approval gates, and an audit trail for AI agent fleets, enabling blocking approval requests and reliable work handoffs.
    6 npm
    MIT