Repository navigation
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