Skip to main content

Estimate costs and lint agent workflow YAML files

Project description

agent-lint

CLI tool for cost estimation and anti-pattern detection in agent workflow YAML configs. Catch expensive, fragile, or ungoverned agent workflows before they hit production.

PyPI Python License: BSL-1.1 CI


The Problem

Agent workflows fail in predictable ways: unbounded loops, no retry limits, missing cost guards, parallel branches with no coordination. Most teams find these problems in production — after a $400 API bill or a stuck workflow that ran for six hours.

agent-lint finds them at config time.

agent-lint demo


Install

pip install agentlinter

Usage

# Lint a single workflow config
agent-lint lint workflow.yaml

# Lint all workflows in a directory, fail CI if score < 80
agent-lint lint workflows/ --fail-under 80

# Estimate token/cost exposure for a workflow
agent-lint estimate workflow.yaml --provider anthropic

# Generate a full audit report
agent-lint lint workflows/ --format markdown

# Suggest autofixes as a diff patch
agent-lint lint workflow.yaml --fix

What It Detects

Anti-patterns:

  • Unbounded retry loops (no max_retries or timeout)
  • Missing cost guards on high-token operations
  • Parallel agent branches with no merge strategy
  • Hard-coded API keys in config (security)
  • Missing checkpointing on long-running workflows
  • Agents with no defined output schema

Cost estimation:

  • Token budget projection per workflow step
  • Worst-case / expected-case / best-case cost ranges
  • Model-aware pricing (Claude, GPT-4, Gemini)

Scoring:

  • 0-100 score per workflow
  • Error (-15 pts), warning (-5 pts), info (-1 pt)
  • CI integration: --fail-under threshold

CI Integration

# .github/workflows/agent-lint.yml
- name: Lint agent workflows
  run: agent-lint lint workflows/ --fail-under 80

Treat your agent configs like production code. Gate them the same way.


Licensing & Tiers

agent-lint is available in two tiers:

Free — Always free, no license key required:

  • lint — anti-pattern detection
  • estimate — token/cost estimation
  • status — show version and tier info

Pro — Unlock additional features with a license key:

  • compare — compare costs across providers side-by-side
  • Markdown export for audit reports
  • Custom pricing tables
  • Custom rule packs
  • Historical tracking and trend analysis

Activate Pro with an environment variable:

export AGENT_LINT_LICENSE=ALNT-XXXX-XXXX-XXXX

Why Static Analysis

No LLM dependency. No API calls. No variance between runs. Agent configs are deterministic artifacts — they should be audited deterministically.


Status

  • Anti-pattern detection (17 rules)
  • Cost estimation (Claude, GPT-4)
  • CI integration with threshold gating
  • Markdown audit reports
  • SARIF output for GitHub Advanced Security
  • GitHub PR annotation format
  • Autofix diff generation (--fix)
  • Docker images (multi-arch)
  • Gemini pricing model
  • VS Code extension

Related Projects

  • mcp-manager — MCP server manager with built-in audit (pip install arete-mcp)
  • ai-spend — Cost observability for the workflows agent-lint guards (pip install ai-spend)
  • animus — The AI operating environment with built-in quality gates and eval pipeline

Part of the AreteDriver AI tooling ecosystem.

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

agentlinter-0.3.4.tar.gz (98.6 kB view details)

Uploaded Source

Built Distribution

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

agentlinter-0.3.4-py3-none-any.whl (46.0 kB view details)

Uploaded Python 3

File details

Details for the file agentlinter-0.3.4.tar.gz.

File metadata

  • Download URL: agentlinter-0.3.4.tar.gz
  • Upload date:
  • Size: 98.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for agentlinter-0.3.4.tar.gz
Algorithm Hash digest
SHA256 ae3a8868309a8d8c6819e4ad99a1f80d1897b19141ab3868c1517aaf5a116c44
MD5 11926f41771388c75a7ae953e310f94e
BLAKE2b-256 951bbd9eb9c361d87d851b4c91517b2add7244f7aac9cfff355cd0beabca75a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentlinter-0.3.4.tar.gz:

Publisher: publish.yml on AreteDriver/agent-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentlinter-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: agentlinter-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 46.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for agentlinter-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1037eb8a7babada47650f81d89cc761dc41cea2c9ed222f547c892cdb3b3769d
MD5 18061fde8f69ef8f80960a1e27e26af8
BLAKE2b-256 97905e349389447b8c4d130f5acc0d79f33901c1f4ea4df6a0fa289bb9231d22

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentlinter-0.3.4-py3-none-any.whl:

Publisher: publish.yml on AreteDriver/agent-lint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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