🛡 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 cost — without 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)
| File | Size | Uploaded | |
|---|---|---|---|
| agentguard_cli-0.2.3.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|