
agentgrasp
io.github.damejerasv0.1.0更新于 Oct 1, 2026
Yes/no questions about local files, and relevant-file search, with TypeSafe Jev
概览
将冗长的 Bash 输出保存到文件而不占用编码代理的上下文,并支持对这些文件进行是/否提问和相关文件搜索。
- 功能
- agentgrasp 会包装每条 Bash 命令,把冗长的输出写入文件,代理只看到简短摘要和文件路径。ask 工具可对文件回答是/否问题,search 工具返回相关文件和行范围而不返回源文本。两个工具都使用 TypeSafe 的 Jev 是/否模型。
- 适用场景
- 当编码代理运行的命令产生非常长的输出,而你希望保持上下文精简同时仍能查询这些输出时适用。适合 Claude Code 工作流中需要提出针对性是/否问题或定位相关文件,而不是阅读整份日志的场景。
- 运行要求
- 作为本地进程运行,可通过安装脚本、npm install -g agentgrasp 或 npx agentgrasp mcp 安装。必须在启动 Claude Code 的环境中设置 TYPESAFE_API_KEY 环境变量;否则 ask 和 search 会返回 provider_unavailable。Claude Code 沙箱必须允许写入 agentgrasp 状态目录。
安装
在 SourceWeft 中
- 打开 控制台中的 agentgrasp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
agentgrasp
agentgrasp keeps long command output out of a Claude Code agent's context. Claude Code still
runs every Bash command. When the output is long, agentgrasp saves it to a file and the agent
sees a short summary with the file path. The agent can then read the file, or ask yes/no
questions about it with the ask tool. The search tool finds the files and line ranges that
are relevant to a question, without returning source text.
ask and search use Jev, TypeSafe's yes/no model.
Install
Instead of the installer, npm install -g agentgrasp installs the same binary, and
npx agentgrasp mcp runs the MCP server without a global install.
The plugin calls agentgrasp from PATH. Set TYPESAFE_API_KEY in the environment that
starts Claude Code; without it, ask and search return provider_unavailable.
Settings
agentgrasp runs each Bash command inside a { ... } group that sends its output to files.
Claude Code asks for approval of every command that holds such a group, also when your allow
rules allow the command, and no allow rule changes that. So in Claude Code's default and
acceptEdits permission modes, every Bash call asks for approval. In bypassPermissions mode
the calls run without a prompt. Your deny rules still block a command in every mode.
When the Claude Code sandbox is on, let Bash write the agentgrasp state directory. Without this, the output cannot go to its files, the shell prints the error, and the command does not run:
Use $XDG_STATE_HOME/agentgrasp instead when XDG_STATE_HOME is set.
Costs and risks
askandsearchsend file content to TypeSafe. TypeSafe lists Jev at $42 per billion input tokens. Each call writes the tokens it used to its record under~/.local/state/agentgrasp/asks/orsearches/.askandsearchcan read any file inside the MCP roots, which are the project directory and the directories you add. This includes files that yourReaddeny rules block. When you allow these tools, you allow that.- The state directory grows until you delete files from it. agentgrasp never deletes them.
- A runaway command can fill the disk until Claude Code's timeout stops it.
Links
- MCP Registry name:
mcp-name: io.github.damejeras/agentgrasp
来源:README.md,提交 f979585
工具
0版本历史
1- v0.1.0最新Oct 1, 2026

