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.
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-underthreshold
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentlinter-0.2.0.tar.gz.
File metadata
- Download URL: agentlinter-0.2.0.tar.gz
- Upload date:
- Size: 44.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
617a949ea36d83950585c39355cf8a465ac4f973ea45e376947d202315438b14
|
|
| MD5 |
7c96985e3a5727d77cfe477aa498d53f
|
|
| BLAKE2b-256 |
5fd7f2e7de23ef4d84848d16792812b9c47042ff3c141a0ca039312671bb5cdd
|
Provenance
The following attestation bundles were made for agentlinter-0.2.0.tar.gz:
Publisher:
release.yml on AreteDriver/agent-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentlinter-0.2.0.tar.gz -
Subject digest:
617a949ea36d83950585c39355cf8a465ac4f973ea45e376947d202315438b14 - Sigstore transparency entry: 1061824230
- Sigstore integration time:
-
Permalink:
AreteDriver/agent-lint@a33805cbbe489699bc7e3005fc2d7adc27b1d545 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/AreteDriver
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a33805cbbe489699bc7e3005fc2d7adc27b1d545 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentlinter-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agentlinter-0.2.0-py3-none-any.whl
- Upload date:
- Size: 33.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fd0bc14a52ec74aa6907f283c5d111145928aa937cfbe7dddbc2a88d2261cd2
|
|
| MD5 |
653e9023c0550fed4f0b90984fb13276
|
|
| BLAKE2b-256 |
f82e151f737a5bdaa76d44de901e8975584ba840d4d9985b2abe80b905393158
|
Provenance
The following attestation bundles were made for agentlinter-0.2.0-py3-none-any.whl:
Publisher:
release.yml on AreteDriver/agent-lint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentlinter-0.2.0-py3-none-any.whl -
Subject digest:
9fd0bc14a52ec74aa6907f283c5d111145928aa937cfbe7dddbc2a88d2261cd2 - Sigstore transparency entry: 1061824231
- Sigstore integration time:
-
Permalink:
AreteDriver/agent-lint@a33805cbbe489699bc7e3005fc2d7adc27b1d545 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/AreteDriver
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a33805cbbe489699bc7e3005fc2d7adc27b1d545 -
Trigger Event:
push
-
Statement type: