- Home
- Skills
- Testing & Debugging
- Agent Tool Budget Gate
Works with the AI Agents you already use
Agent Tool Budget Gate
Check recorded tool calls against explicit count, duration and error limits. Get deterministic PASS/FAIL reports without replaying a run.
$5
Agent Tool Budget Gate
Example session with this skill installed
Run the bundled synthetic pass and fail completed-event JSONL examples against examples/policy.json using the packaged Python runner in a supported execution environment. Use separate new output directories. Return the measured checks, exit statuses, report paths and input hashes. Do not replay calls, change the policy or claim this tests a real customer run.
- Read your context and instructions
- Compiled the agent tool budget
Agent Tool Budget Gate — Synthetic Local Demo
Two fictional completed-event fixtures were measured locally against the same policy. This is local Python execution evidence, not a customer deployment or a paid-purchaser MCP test.
| Check | Maximum | PASS fixture | FAIL fixture |
|---|---|---|---|
| calls | 3 | 3 (PASS) | 4 (FAIL) |
| total_duration_ms | 1000 | 600 (PASS) | 1300 (FAIL) |
| errors | 0 | 0 (PASS) | 1 (FAIL) |
| tool:read_file | 2 | 2 (PASS) | 2 (PASS) |
| tool:search | 1 | 1 (PASS) | 2 (FAIL) |
PASS fixture: 3 calls, 600 summed milliseconds, 0 errors. CLI exit 0.
FAIL fixture: 4 calls, 1300 summed milliseconds, 1 error and 2 search calls. Four selected limits are exceeded; CLI exit 1 is expected.
Each run writes report.md and report.json into its own new output directory. Input files and policy were not changed.
Exact input identities
- PASS trace SHA-256:
80416f4aedb27fcaba2d57e431805e5f309c2c92e632c7aa7b0f72eabddbbd73 - FAIL trace SHA-256:
885c9c2adaf484cbfc27c0d54ca3ac745094f7212b79e842dd2929d3c445f6b9 - Shared policy SHA-256:
1c7918bee760b9f14fdab60307b32783d6943f5df1eae9402f4e5521b578ddd1
Review next
Inspect the failing checks and the scope of the original recorded trace. Keep the negative evidence. Decide whether excess calls, errors or summed tool time require a workflow change; do not loosen budgets merely to produce PASS.
Verdict covers only the supplied normalized completed events and explicit policy. It does not prove trace completeness, task success, safety, wall-clock latency, token consumption, or monetary cost. Durations are summed, including concurrent calls.
The runner was checked by 32 tests on each of the two stated runtimes. Missing/invalid input returns exit 2 and must not be interpreted as a budget result.
Connects securely to your tools. The creator never sees your data.
About this skill
Measurable budgets for a recorded agent run
Agent Tool Budget Gate checks local, normalized completed tool-call events against explicit limits you choose. Get a reproducible PASS/FAIL verdict for total calls, summed tool duration, errors and optional per-tool call counts.
What you receive
- A deterministic Python runner using only the standard library.
- Markdown and JSON reports with each measured check and SHA-256 identities for the input and policy.
- Strict validation: missing durations, duplicate event IDs, malformed JSON, unsupported fields and oversized inputs stop with an input error.
- Passing and failing synthetic examples, their measured reports, an input contract and 32 self-tests.
Workflow
- Supply a local JSONL with one completed tool call per line: event_id, tool, duration_ms and status (ok/error).
- Supply a JSON policy with your call, summed-duration and error limits; optional per-tool limits are supported.
- Use a coding-agent environment that provides authorized execution of the packaged Python runner with local terminal and file access.
- Read the verdict and evidence, then decide whether the recorded run needs review.
Requirements and important limits
Python 3.12+ standard library. Tested locally on Windows/Python 3.12.14 and Ubuntu/Python 3.14.4. Agensi access is through its agent connection; a downloadable ZIP is not offered to buyers. The host must support authorized packaged-runner execution. Actual paid-purchaser MCP invocation has not been validated. If that execution capability is unavailable, the skill stops and explains the unsupported environment.
Inputs must already follow the normalized schema; native Codex/Claude/provider-log adapters are not included. Partial or cancelled calls and missing durations must be resolved during normalization. No automatic normalization or completeness guarantee is provided.
PASS covers only supplied completed events and the chosen numeric limits. Summed duration includes concurrent calls and is not wall-clock latency. The skill does not measure API charges, tokens, task success or safety, monitor live sessions, replay tools, or enforce a tool allowlist. Unlisted tools still count toward global limits.
The runner reads the selected trace and policy and writes a new local report directory. It does not send data, contact external services, execute recorded tool calls or modify source inputs. Reports retain tool identifiers and input hashes; avoid confidential content in tool names.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Normalized completed-event schema only; no native provider-log adapter, live monitoring, tool replay or automatic stopping. Counts rely on supplied records. Summed duration is not wall-clock time; no token/cost/success/safety/completeness guarantee. Host support for authorized packaged Python execution is required; actual paid-purchaser MCP invocation is unvalidated. UTF-8, trace <=2 MiB/20,000 events, line <=64 KiB, policy <=64 KiB, JSON depth <=16. Inputs unchanged; new output directory required.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago
- Software
Python 3.12+ (standard library only)
Permissions
Terminal: execute the offline Python runner. Read: only the user-selected normalized JSONL trace and JSON policy. Write: only a user-selected new local report directory. No network, browser or environment-variable access is required by the runner. Never replay recorded calls or export purchased skill files.