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_ai_muaz_iqubal_muaz-0.1.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file agentguard_ai_muaz_iqubal_muaz-0.1.2.tar.gz.

File metadata

File hashes

Hashes for agentguard_ai_muaz_iqubal_muaz-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bff8ace059f46acb8886ad6f00d88c941781ad57711e140590847b59f71d70d4
MD5 63280c1d6a337b5ca98abaf0a26fa42f
BLAKE2b-256 4792178372233cf8f384fe97724890e4afedc727b48111dde672a780d724aac0

See more details on using hashes here.

File details

Details for the file agentguard_ai_muaz_iqubal_muaz-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for agentguard_ai_muaz_iqubal_muaz-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81262bee28166f5de32767f6b0a5b82bdb331e2f87e9024d9056fb217eaebfb7
MD5 8b7c0bfc5c17d876c9e59c246e6b7da9
BLAKE2b-256 6f0d6765ecc52ff6f5e65644b7c5e1f74b45ea28b11873e468d32778bbbf7d3c

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