Skip to main content

🛡 AgentGuard

Pre-execution cost estimator for agentic AI systems

AgentGuard analyzes your multi-file agentic codebase and estimates the minimum and maximum possible LLM API costwithout running any code or calling any APIs.

Install

pip install -e .

Usage

agentguard --root_dir ./my_agent
agentguard --root_dir ./my_agent --model claude-3-5-sonnet
agentguard --root_dir ./my_agent --input_tokens 400 --output_max 1000
agentguard --root_dir ./my_agent --json_out report.json
agentguard --root_dir ./my_agent --quiet --dag

What It Detects

  • API calls inside loops (cost multiplies with iteration count)
  • Nested loops (exponential scaling)
  • Missing loop depth limiters (unbounded execution)
  • Repeated prompts (caching opportunity)
  • Large static prompts (high baseline cost)
  • High-complexity tasks (reasoning tax ×20)

Supported Models

gpt-4o, gpt-4o-mini, gpt-4-turbo, claude-3-5-sonnet, claude-3-haiku, claude-3-opus, gemini-1.5-pro, gemini-1.5-flash

Architecture

CLI → Crawler → Analyzer (AST/regex) → Simulator (math model) → Reporter

Release files for agentguard-cli 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentguard-cli 0.2.3
File Size Uploaded
agentguard_cli-0.2.3.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agentguard-cli 0.2.3
File Interpreter ABI Platform
agentguard_cli-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 26.0 kB

Release files / agentguard_cli-0.2.3.tar.gz

Download URL agentguard_cli-0.2.3.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2cac587f49a5a6aacf328bb3998f7ec23e282e2ae01fdc8b03ba2bfb16f37ca0
BLAKE2b-256 checksum
How to use checksums
82f676684d44d4b6b6f02a58e726d3505212ad4233dc26b10227cbd0e257b35d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / agentguard_cli-0.2.3-py3-none-any.whl

Download URL agentguard_cli-0.2.3-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec239cf9e7d068ee360127ca0ff7bc3da56b6405e7d9260a372d1a0aaa60ff9e
BLAKE2b-256 checksum
How to use checksums
56c6425538bfad8935e2d16b7d6cc3205dd5c99676563b2f631f83d2ba9761cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page