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.3.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.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentguard_cli-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 2cac587f49a5a6aacf328bb3998f7ec23e282e2ae01fdc8b03ba2bfb16f37ca0
MD5 c779c7d98641d1e815f1d4489e4164de
BLAKE2b-256 82f676684d44d4b6b6f02a58e726d3505212ad4233dc26b10227cbd0e257b35d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentguard_cli-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec239cf9e7d068ee360127ca0ff7bc3da56b6405e7d9260a372d1a0aaa60ff9e
MD5 6ee6f1a29da302454bef5ef14bcc94fc
BLAKE2b-256 56c6425538bfad8935e2d16b7d6cc3205dd5c99676563b2f631f83d2ba9761cd

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