Skip to main content

Detect runaway AI costs before they hit production (STILL IN DEVELOPING PHASE)

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.0.tar.gz (11.7 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.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentguard_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 57e2ce20230a636fb5190e5cfb5460d498c7dd76c87c500b98bb39479fffd9f0
MD5 cf7532c94e12fc2d52eab857b6e6e2c0
BLAKE2b-256 04eb9a3386992dd5d83a2881b9c1344da67a64c92ad8ee853afa00f012757ca0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for agentguard_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32249f993025c671b20ccb9077e41b75ec413615148d5dab8a2784b3b72cdc1d
MD5 b4afce1e0b76135c29682bfd2c492fe0
BLAKE2b-256 18a1ccdd68907a5e02c0486701010a127be3a21b20e80106ac9a48ce3efa350d

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