SnapAgent
Snapshot-test your AI agent's tool-call behavior and catch silent regressions
npx -y github:Isco0819/snapagentEver run into this?
Like jest-snapshot (part of Jest's 43k-star ecosystem) which locks down expected UI output, but nothing equivalent exists for AI agent behavior. When you upgrade an MCP server, tweak a system prompt, or bump your agent framework, you have zero visibility into whether the agent started calling different tools, in a different order, or with different args. Regressions in agent behavior ship silently.
The fix
npx snapagent wraps your MCP stdio server as a transparent proxy, recording every tool call and response schema into a JSON snapshot file. On the next run it diffs the two sessions and exits 1 on drift — drop it into CI like any snapshot test.
What it does
- Record mode: proxy MCP stdio and serialize tool name, call order, arg shapes, and response schema to .snapagent/ snapshot files
- Compare mode: structured diff two snapshots — new tools, removed tools, reordered calls, schema changes all flagged with field-level diffs
- CI mode: --ci flag exits non-zero on any behavioral drift, prints a human-readable regression report to stdout