Repository navigation
Releases
v0.1.8
Changelog
features
fixes
Use it as a step
- uses: qansaid/agentdiet@v1
with:
max-tokens: 4000 # fail the job above this always-on budget; 0 disables the gate
window: 200000 # context window for the share column| input | default | meaning |
|---|---|---|
path |
. |
repository path to audit |
max-tokens |
4000 |
fail when always-on tokens exceed this; 0 disables the gate |
window |
200000 |
context window used for the share column |
version |
latest |
agentdiet version to install |
| output | meaning |
|---|---|
always-on-tokens |
tokens injected into every request |
grade |
A-F against the budget |
Deterministic and offline: no API key, no network at audit time. The
estimator (prose chars/4.5 + fenced-code chars/3.4, rounded up per segment)
is calibrated against cl100k_base at a measured MAE of 8%.
Why this exists
Every agent runtime has a folder of files it loads unconditionally. They
grow by accretion — a rule per incident, a table per architecture decision —
until the agent spends 12k tokens of attention on stale instructions before
it has read the question. agentdiet turns that into a number in the CI log
and a budget that fails the pull request that would have made it worse.
MIT licensed. Source, docs, and real sample output:
https://github.com/qansaid/agentdiet
v0.1.7
Changelog
features
other
- 3a615df chore(deploy): script and document the Cloudflare Tunnel deployment (#2)
- 83fd1d2 docs(readme): add a theme-aware banner, pipeline diagram and collapsible reference (#3)
- 65794ca docs(site): replace prose em dashes with ordinary punctuation (#4)
Use it as a step
- uses: qansaid/agentdiet@v1
with:
max-tokens: 4000 # fail the job above this always-on budget; 0 disables the gate
window: 200000 # context window for the share column| input | default | meaning |
|---|---|---|
path |
. |
repository path to audit |
max-tokens |
4000 |
fail when always-on tokens exceed this; 0 disables the gate |
window |
200000 |
context window used for the share column |
version |
latest |
agentdiet version to install |
| output | meaning |
|---|---|
always-on-tokens |
tokens injected into every request |
grade |
A-F against the budget |
Deterministic and offline: no API key, no network at audit time. The
estimator (prose chars/4.5 + fenced-code chars/3.4, rounded up per segment)
is calibrated against cl100k_base at a measured MAE of 8%.
Why this exists
Every agent runtime has a folder of files it loads unconditionally. They
grow by accretion — a rule per incident, a table per architecture decision —
until the agent spends 12k tokens of attention on stale instructions before
it has read the question. agentdiet turns that into a number in the CI log
and a budget that fails the pull request that would have made it worse.
MIT licensed. Source, docs, and real sample output:
https://github.com/qansaid/agentdiet
v0.1.6
Changelog
other
- 637e4a1 docs(release): carry Marketplace listing copy in release footer
Use it as a step
- uses: qansaid/agentdiet@v1
with:
max-tokens: 4000 # fail the job above this always-on budget; 0 disables the gate
window: 200000 # context window for the share column| input | default | meaning |
|---|---|---|
path |
. |
repository path to audit |
max-tokens |
4000 |
fail when always-on tokens exceed this; 0 disables the gate |
window |
200000 |
context window used for the share column |
version |
latest |
agentdiet version to install |
| output | meaning |
|---|---|
always-on-tokens |
tokens injected into every request |
grade |
A-F against the budget |
Deterministic and offline: no API key, no network at audit time. The
estimator (prose chars/4.5 + fenced-code chars/3.4, rounded up per segment)
is calibrated against cl100k_base at a measured MAE of 8%.
Why this exists
Every agent runtime has a folder of files it loads unconditionally. They
grow by accretion — a rule per incident, a table per architecture decision —
until the agent spends 12k tokens of attention on stale instructions before
it has read the question. agentdiet turns that into a number in the CI log
and a budget that fails the pull request that would have made it worse.
MIT licensed. Source, docs, and real sample output:
https://github.com/qansaid/agentdiet
v0.1.5
Measure the context your AI coding agent loads before you type a single word and fail the build when it grows.
agentdiet is a single static binary that walks a repository, finds every file your agent runtime injects into the prompt AGENTS.md, CLAUDE.md, .cursorrules, copilot-instructions.md, skills, MCP declarations and reports what that costs: always-on tokens paid on every request, the on-demand surface, cost per 1,000 sessions, and an A–F grade against a budget you can enforce in CI.
It does not lint your code. It lints the instructions: the one part of the repository that every agent pays for on every turn, and the part nobody measures.
ALWAYS-ON paid on every request, before you type
442 0.22% 41 L .claude/CLAUDE.md
TOTAL 442 always-on tokens (0.22% of a 200,000-token window)
GRADE A (budget 1,500) on-demand surface: 76,533 tokens
COST $1.33 per 1,000 sessions at $3.00 per 1M input tokens
Use it as a step
- uses: indraoverflow/agentdiet@v0.1.5
with:
max-tokens: 4000 # fail the job above this always-on budget; 0 disables the gate
window: 200000 # context window for the share column| input | default | meaning |
|---|---|---|
path |
. |
repository path to audit |
max-tokens |
4000 |
fail when always-on tokens exceed this; 0 disables the gate |
window |
200000 |
context window used for the share column |
version |
latest |
agentdiet version to install |
| output | meaning |
|---|---|
always-on-tokens |
tokens injected into every request |
grade |
A–F against the budget |
Deterministic and offline: no API key, no network at audit time. The estimator (prose chars/4.5 + fenced-code chars/3.4, rounded up per segment) is calibrated against cl100k_base at a measured MAE of 8%.
What's new in v0.1.5
agentdiet --versionnow reports the version it was built from instead ofdev, including builds that receive no linker flags — sogo install github.com/indraoverflow/agentdiet@latestprintsagentdiet 0.1.5, and CI logs name the version they actually ran.- The
v1major tag is moved onto each released commit by the release workflow, souses: indraoverflow/agentdiet@v1resolves to the same commit asv0.1.5.
Why this exists
Every agent runtime has a folder of files it loads unconditionally. They grow by accretion — a rule per incident, a table per architecture decision — until the agent spends 12k tokens of attention on stale instructions before it has read the question. agentdiet turns that into a number in the CI log and a budget that fails the pull request that would have made it worse.
MIT licensed. Source, docs, and real sample output: https://github.com/indraoverflow/agentdiet
v0.1.4
Measure the context your AI coding agent loads before you type a single word — and fail the build when it grows.
agentdiet is a single static binary that walks a repository, finds every file your agent runtime injects into the prompt — AGENTS.md, CLAUDE.md, .cursorrules, copilot-instructions.md, skills, MCP declarations — and reports what that costs: always-on tokens paid on every request, the on-demand surface, cost per 1,000 sessions, and an A–F grade against a budget you can enforce in CI.
It does not lint your code. It lints the instructions: the one part of the repository that every agent pays for on every turn, and the part nobody measures.
ALWAYS-ON paid on every request, before you type
442 0.22% 41 L .claude/CLAUDE.md
TOTAL 442 always-on tokens (0.22% of a 200,000-token window)
GRADE A (budget 1,500) on-demand surface: 76,533 tokens
COST $1.33 per 1,000 sessions at $3.00 per 1M input tokens
Use it as a step
- uses: indraoverflow/agentdiet@v0.1.4
with:
max-tokens: 4000 # fail the job above this always-on budget; 0 disables the gate
window: 200000 # context window for the share column| input | default | meaning |
|---|---|---|
path |
. |
repository path to audit |
max-tokens |
4000 |
fail when always-on tokens exceed this; 0 disables the gate |
window |
200000 |
context window used for the share column |
version |
latest |
agentdiet version to install |
| output | meaning |
|---|---|
always-on-tokens |
tokens injected into every request |
grade |
A–F against the budget |
Deterministic and offline: no API key, no network at audit time. The estimator (prose chars/4.5 + fenced-code chars/3.4, rounded up per segment) is calibrated against cl100k_base at a measured MAE of 8%.
Why this exists
Every agent runtime has a folder of files it loads unconditionally. They grow by accretion — a rule per incident, a table per architecture decision — until the agent spends 12k tokens of attention on stale instructions before it has read the question. agentdiet turns that into a number in the CI log and a budget that fails the pull request that would have made it worse.
MIT licensed. Source, docs, and real sample output: https://github.com/indraoverflow/agentdiet
v0.1.3
Changelog
other
- 330e3cb ci(release): pin release tag to the pushed semver tag and stop moving v1 from publishing