agentgrasp

io.github.damejerasv0.1.0更新於 Oct 1, 2026

Yes/no questions about local files, and relevant-file search, with TypeSafe Jev

概覽

AI 產生的概覽

將冗長的 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 狀態目錄。
安裝前請注意
ask 與 search 會把檔案內容傳送給 TypeSafe,TypeSafe 將 Jev 定價為每十億輸入 token 42 美元,因此呼叫會產生費用。這些工具可以讀取 MCP 根目錄內的任何檔案,包括被 Read 拒絕規則阻擋的檔案。狀態目錄會持續成長直到你刪除檔案,失控的指令可能填滿磁碟直到逾時將其停止。在預設與 acceptEdits 模式下每次 Bash 呼叫都會要求核准。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 agentgrasp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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

sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/damejeras/agentgrasp/releases/latest/download/agentgrasp-installer.sh | shclaude plugin marketplace add damejeras/agentgraspclaude plugin install agentgrasp@agentgrasp

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:

json
{  "sandbox": {    "filesystem": {      "allowWrite": ["~/.local/state/agentgrasp"]    }  }}

Use $XDG_STATE_HOME/agentgrasp instead when XDG_STATE_HOME is set.

Costs and risks

  • ask and search send 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/ or searches/.
  • ask and search can read any file inside the MCP roots, which are the project directory and the directories you add. This includes files that your Read deny 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
  1. v0.1.0最新Oct 1, 2026