Skip to main content

Detect runaway AI costs in agentic systems before they hit production

Project description

🛡 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentguard_cli-0.2.2.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentguard_cli-0.2.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file agentguard_cli-0.2.2.tar.gz.

File metadata

  • Download URL: agentguard_cli-0.2.2.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for agentguard_cli-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d868411414bf17701c9cc0d93d2d054912556e277f691dc871a0389109b35b4d
MD5 6e418d18f866cfb3f98f711cc05c269e
BLAKE2b-256 c99474b30b84c44df07a0cd5fd7d24e2b1b9f9cdcb71ffb1a1849a38dce54a98

See more details on using hashes here.

File details

Details for the file agentguard_cli-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: agentguard_cli-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for agentguard_cli-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39f42fef4939855839c7f3439950f25a06cfea7eefb340b9bcc190b5e85c48eb
MD5 47eb33a08017b30646dd413d4eb4d495
BLAKE2b-256 d96c410f5916959d2957f9633974880b51dc2377de9b4443031ad70f598b6242

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page