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: MIT 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.


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

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.


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
  • Gemini pricing model
  • VS Code extension
  • Auto-fix suggestions

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.2.tar.gz (78.1 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.2-py3-none-any.whl (42.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentlinter-0.3.2.tar.gz
  • Upload date:
  • Size: 78.1 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.2.tar.gz
Algorithm Hash digest
SHA256 8c6d052ca79723323bc49fadc161d4b4363db0ad4948ac95282b975ac2328e45
MD5 26e01fe1860d7138527f2f2d58d5b56e
BLAKE2b-256 8f56cbdbeb5436dab78ed36c2e59d6a0f8f9ed62716ce1853b0d906ca83e3c83

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentlinter-0.3.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: agentlinter-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 42.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c157f5a431e671014eddd03b974014b504e0044fa352f3a5855d7cd1462f45d0
MD5 4b81f8f9f3e89d36ddcaee825ff265d0
BLAKE2b-256 100f789a8ba625a9ed7d17d2d810b8005a282f421671fe7391e982a4bcffc525

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentlinter-0.3.2-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