The night shift for your AI agents.
Teams ship agents, then they rot silently — tools break, prompts bloat, bills creep. While you sleep, Fettle uses Codex to health-check every agent, fix what's degrading, benchmark-gate the change, and hand you a morning report.
Run it in four commands
Fettle is a real CLI, not a mockup. Point it at your agents and watch the night shift work.
npx fettle checkFettle reads each agent's traces and prints a health report — success rate, prompt size, cost, security.
npx fettle fix support-bot --dry-runSee the exact plan Fettle would hand to Codex, without running anything.
npx fettle fix support-bot --applyCodex fixes a working copy; the benchmark gate verifies it; only then is it merged.
npx fettle watchArm the night shift — Fettle maintains idle agents automatically, with or without you watching.
One coach, three jobs.
Fettle is a maintenance engineer for your agents. Every night it does the work no one has time for.
Fix bugs
Codex reads the agent's source and traces, finds the broken call or stale tool schema, and opens the smallest fix that resolves it.
Coach the workflow
Explains the professional pattern the agent is missing — cache-first fetching, tight prompts, capped retries — then applies it.
Security patches
Scans traces for prompt-injection exposure and leaked secrets, then patches the hole before it ever ships.
Tonight's fleet
4 of 4 degraded · computed live from trace dataA missing backoff cap means that when a job fails, the agent retries in a tight loop — up to 11 times in one turn — inflating latency and token spend. Planning has degraded: average steps-per-task climbed from 3 to 7 with no better outcomes.
Two problems: (1) untrusted row content from the DB is concatenated straight back into the prompt, so a poisoned row can hijack the agent (prompt injection). (2) The DB connection string — including the password — is logged to trace output on every error, leaking secrets into logs.
The `lookup_invoice` tool started failing on ~30% of calls after the billing API renamed `invoice_id` to `invoiceId`. The tool schema was never updated, so the agent sends the wrong field and gets 422s.
The system prompt has been appended to for months and is now ~3,200 tokens of stale examples and contradictory rules. Every call pays for it, and token cost has roughly doubled with no quality gain. The workflow also re-fetches the same sources every run instead of caching.