Agent autonomy gets granted by vibes.
earn-autonomy is a free CLI gate that decides when your agent may act unattended. Clean runs build a streak, the streak earns the clearance, and one blocked run or one rule change takes it back. Autonomy becomes earned, revocable state instead of a setting somebody flipped on a Friday.
npm install -g earn-autonomyYour agent nailed fifty drafts in a row, so you stopped reading them. Somewhere around draft thirty the review became a skim, then a rubber stamp, then a decision to flip the thing to auto. Nobody wrote that decision down. Nothing can take it back.
Eval tools score outputs and dashboards chart the scores, but a score is a measurement, and somewhere a human still has to convert measurements into permission to act unattended. That conversion has no primitive, so it happens informally, once, and sticks forever.
Treat the agent the way you treat a new hire. Responsibilities get earned one clean stretch at a time, and a bad incident takes responsibilities back. The mechanic needs three parts.
- 01a floor the judge cannot override
Deterministic rules run first. Unresolved merge tokens, a missing opt-out line, dead links, whatever must never ship. One rule violation blocks the action no matter what any score says, because rules cannot be sweet-talked.
- 02an advisory rubric on top
The LLM judge scores the quality dimensions, personalization, voice, grounding. A fooled score up here costs you polish. It cannot cost you compliance, because the floor already held.
- 03a streak that earns and revokes
Every check writes a row. N consecutive passes under the same config earns clearedForAutonomy. One block resets the streak to zero, and changing the rules resets it too, because yesterday's clearance was earned under yesterday's rules.
You get a verdict, the streak, and clearedForAutonomy as machine-readable JSON. Wire your agent to it in one branch. Exit code 1 means do not act. Exit 0 while clearedForAutonomy is false means a human reviews, then acts. Exit 0 once it flips true means the agent has earned this action unattended, under these rules, until a block or a rule change takes it back.
Save these two files and run the command. No API key needed.
{ "to": "sam@acme.com", "body": "Hi Sam, saw Acme shipped. Reply STOP to unsubscribe.", "fields": {} }{ "rules": [{ "name": "no-merge-token" }, { "name": "opt-out-present" }], "rubric": { "dimensions": [] }, "gateN": 3 }earn-autonomy check message.json --config config.json --pack outbound --jsonThe gate is a CLI with a JSON boundary, so anything that can shell out and read an exit code can use it. LangGraph, CrewAI, a cron job, a GitHub Action.
Before it shipped, the gate had to pass its own kind of gate, a stranger-walk against the real install. The walk blocked it twice and caught four real failures, including a safety guarantee that was false under the docs' own recommended pattern. The full writeup lives on the blog.
- Node and npm. The install is 13KB and one command.
- The keyless path runs the deterministic rules only, costs nothing, and needs no API key.
- With a rubric configured you pay one model call per check on your own Anthropic key. Nothing phones home.
- The tool ships no spend cap, so set one in your provider console.
- The streak lives in a local runlog your output names on every run. Pin --runlog to an absolute path when a scheduler calls the gate.
Point it at whatever your agent does unattended today. Put the checks you cannot afford to lose in rules. Give the judge the rest.
npm install -g earn-autonomy