Agentsnap

io.github.MukundaKatta由 GitHub 帳號 MukundaKatta 發布v0.1.0更新於 Oct 24, 2026

Snapshot tests for AI tool-call traces: diff, validate, and catch silent regressions.

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

讓助理正規化、比對並驗證 AI 代理的工具呼叫軌跡,以找出執行之間的隱性回歸。

可以做什麼
以 agentsnap 函式庫為基礎提供三個工具。normalize_trace 會把原始工具呼叫軌跡轉成標準的 Trace 結構,並計算確定性的 SHA-256 指紋雜湊。diff_traces 會把基準軌跡與目前執行比對,回傳新增、移除、變更以及狀態碼(例如 PASSED、OUTPUT_DRIFT、TOOLS_REORDERED、TOOLS_CHANGED、REGRESSION),並可用 ignore_paths 忽略雜訊欄位。validate_snapshot 會依 Trace 結構描述檢查快照,回報必填欄位或工具項目的問題。
適用情境
適合維護會呼叫工具的代理、並想對其軌跡做回歸檢查的情境,例如比較變更前後的執行,或驗證已儲存的快照。當工具參數、順序或非確定性結果可能在一般單元測試中不被察覺地漂移時,特別有用。
執行需求
以本機 stdio 程序在使用者機器上執行,僅限桌面端。可透過 npx @mukundakatta/agentsnap-mcp 或全域 npm 安裝;需要 Node.js 與 npm。未宣告驗證、環境變數或標頭。
安裝前請注意
此伺服器會讀取你傳入的軌跡資料,其中可能包含工具參數、輸入與模型名稱;送出前請把這類軌跡視為可能敏感。未宣告憑證、付款或寫入操作。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

agentsnap-mcp

[npm] [tests] [mcp]

An MCP server that gives AI assistants the ability to inspect, normalize, diff, and validate agent tool-call traces.

Built on top of @mukundakatta/agentsnap. Works with Claude Desktop, Cursor, Cline, Windsurf, Zed, and any other MCP client.

Tools exposed

normalize_trace

Coerce a raw tool-call trace into the canonical agentsnap Trace shape and compute a deterministic SHA-256 fingerprint hash. Use this to compare runs cheaply or feed downstream diff tools.

json
{  "trace": [    { "name": "search", "args": { "q": "cats" } },    { "name": "fetch",  "args": "https://example.com" }  ],  "input": "find cats",  "model": "claude-opus-4-7"}

→

json
{  "normalized": {    "version": 1,    "model": "claude-opus-4-7",    "input": "find cats",    "output": null,    "tools": [      { "name": "search", "args": { "q": "cats" } },      { "name": "fetch",  "args": "https://example.com" }    ],    "error": null,    "fingerprint": { "node": "v22.0.0", "agentsnap": "0.1.0" }  },  "hash": "sha256:..."}

diff_traces

Diff a baseline trace against a current run. Returns a uniform additions / removals / changes vocabulary plus the agentsnap status code (PASSED, OUTPUT_DRIFT, TOOLS_REORDERED, TOOLS_CHANGED, REGRESSION). Use ignore_paths to silence noisy fields before classification.

json
{  "baseline": { "version": 1, "tools": [{ "name": "search", "args": { "q": "cats" }, "result_hash": "sha256:aaa" }], "error": null, "fingerprint": {...} },  "current":  { "version": 1, "tools": [{ "name": "search", "args": { "q": "cats" }, "result_hash": "sha256:bbb" }], "error": null, "fingerprint": {...} },  "ignore_paths": ["tools[].result_hash"]}

→ { "same": true, "status": "PASSED", "additions": [], "removals": [], "changes": [] }

validate_snapshot

Sanity-check a snapshot against the agentsnap Trace schema. Verifies required fields, tool-entry shape, and surfaces actionable issues. Returns valid=true on success or a list of human-readable problems.

Install

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "agentsnap": {      "command": "npx",      "args": ["-y", "@mukundakatta/agentsnap-mcp"]    }  }}

Cursor / Cline / Windsurf / Zed

Same shape, in the appropriate mcp.json for your client. Most clients auto-discover via npx -y @mukundakatta/agentsnap-mcp.

Local install

bash
npm install -g @mukundakatta/agentsnap-mcpmcp-agentsnap        # listens on stdio

Why this matters

Agents that call tools drift silently. A tool argument changes shape, a nondeterministic result flips a downstream branch, an extra tool sneaks in between releases — none of it shows up in unit tests. agentsnap captures the trace; this MCP server lets your assistant inspect and reason about traces directly: normalize one, diff two, or validate a saved snapshot, all from the model's tool-use surface.

License

MIT.

來源:README.md,提交 5bc93c8

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分