AgentOps Autopilot is the reliability layer every AI agent eventually needs anyway: timeouts, retries, JSON repair, turn budgets, context pressure — five battle-tested Python modules, zero dependencies, drop-in in 10 minutes.
Get the toolkit Read the source (MIT core)Not the ones in the blog posts. The ones that page you at 2am — each with a detection signal and a fix in the toolkit.
Turn runs 40 steps, dies at step 41, loses everything. turn_budget ships partial work with a status note instead.
"All 60 results" becomes 10, no error raised. validate= catches shape and count before your agent hallucinates on top of it.
max_tokens cuts mid-string. json_repair runs a deterministic repair ladder and tells you how dirty the output was.
Same failure, 5 identical calls, hard stop. failure_journal counts today's strikes and halts the spin.
Early instructions silently forgotten before the API ever errors. context_pressure gives the leading indicator + graduated actions.
"Uploaded!" — nothing uploaded. The verify-by-readback pattern in the templates makes claims cost a read.
One wrapper around every external call. Structured failure records your agent can reason about — not stack-trace soup.
# the whole integration from resilient_call import resilient_call from turn_budget import TurnBudget from failure_journal import FailureJournal budget = TurnBudget(total_s=280, reserve_s=20) journal = FailureJournal("logs/failures.jsonl") r = resilient_call(lambda: my_llm(prompt), name="llm", timeout=45, retries=3, validate=lambda x: x.get("choices"), budget_s=budget.usable) # retries never eat the turn if not r.ok: journal.record_call_result(run_id, "llm", r, budget=budget)
✓ retries recover flaky call ✓ timeout enforced ✓ validate rejects bad shape ✓ 429 retried → structured failure ✓ permanent error not retried ✓ strict_json catches truncated json ✓ truncated doc recovered ✓ anti-spin counter fires
MIT core is free forever. You're paying for the templates, the runbook, and not spending your weekend rebuilding what we already debugged in production.
Every module exists because one of these failure modes hurt a real production agent first: a 300-second runtime timeout that killed whole turns; an API that silently truncated "all 60 results" to 10; JSON cut mid-string; identical failures retried until the runtime hard-stopped. The toolkit is that scar tissue, generalized — and shipped with a chaos gauntlet that proves it recovers.