Agent lifecycle infrastructure

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.

fettle — night shift
$ npx fettle check
43/100Ops Scheduler AgentLangGraph
success 67% · 654tok · ~$67/mo Tool success rate is 67% → fettle fix
55/100Internal SQL CopilotCustom (Node)
success 75% · 1211tok · ~$120/mo Tool success rate is 75% → fettle fix
68/100Acme Support BotLangChain
success 71% · 837tok · ~$84/mo Tool success rate is 71% → fettle fix
85/100Market Research AssistantOpenAI Agents SDK
success 100% · 3228tok · ~$386/mo Prompt is bloated (3228 tokens/call) → fettle coach
4 of 4 agents need maintenance.

Run it in four commands

Fettle is a real CLI, not a mockup. Point it at your agents and watch the night shift work.

01
npx fettle check

Fettle reads each agent's traces and prints a health report — success rate, prompt size, cost, security.

02
npx fettle fix support-bot --dry-run

See the exact plan Fettle would hand to Codex, without running anything.

03
npx fettle fix support-bot --apply

Codex fixes a working copy; the benchmark gate verifies it; only then is it merged.

04
npx fettle watch

Arm 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.

fettle fix

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.

fettle coach

Coach the workflow

Explains the professional pattern the agent is missing — cache-first fetching, tight prompts, capped retries — then applies it.

fettle patch

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 data
Ops Scheduler Agent
LangGraph
43

A 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.

67%
success
654
tok/call
$67
est/mo
Fix bugFix bugFix bug
Internal SQL Copilot
Custom (Node)
55

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.

75%
success
1211
tok/call
$120
est/mo
Fix bugSecurity patch
Acme Support Bot
LangChain
68

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.

71%
success
837
tok/call
$84
est/mo
Fix bug
Market Research Assistant
OpenAI Agents SDK
85

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.

100%
success
3228
tok/call
$386
est/mo
Coach workflow