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.1.tar.gz (12.2 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.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentguard_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 12.2 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.1.tar.gz
Algorithm Hash digest
SHA256 04e41dfae4deeecc69b8f23ed94099ea41aff706a29d763f4c6c0d7afb17b1d5
MD5 fd7c51522bc6f26a754770e7d08899b6
BLAKE2b-256 2a49470193c65e6e715cddb14f6db439274a91579cb8da49b7e1dac3fa9a78ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentguard_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07840d39267412fdcf315d0dbf081cc48ad0ec03c6d2d5df0e3ce035cdeb0c8e
MD5 68537b179b5142672dc02b7cb7f07791
BLAKE2b-256 4349d83ddbd7d3184073c00fc354c1036724929d8f2676644c13123d0af9e6c5

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