Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add MLOps-Courses/agentops-open-course --skill agent-resiliencegit clone --depth 1 https://github.com/MLOps-Courses/agentops-open-courseWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mlops-courses/agentops-open-course/agent-resilience)<a href="https://agentmods.dev/skills/mlops-courses/agentops-open-course/agent-resilience"><img src="https://agentmods.dev/badge/skills/mlops-courses/agentops-open-course/agent-resilience/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mlops-courses/agentops-open-course/agent-resilience"><img src="https://agentmods.dev/badge/skills/mlops-courses/agentops-open-course/agent-resilience.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00064 | $0.00650 |
| Opus 5.5 | $0.00026 | $0.00260 |
| Sonnet 5.5 | $0.00013 | $0.00130 |
| Haiku 4.5 | $0.00006 | $0.00065 |
Grade A, and why
agent-resilience scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 36 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Resilience
Give an agent's outbound calls three layers of failure handling, applied in the right place. The rule that generalizes: retry only where the call is idempotent, and only where a replica exists to retry against.
When to use
- A slow tool or model call can hang a whole turn instead of failing on a deadline.
- A hard-down dependency is hammered with the full retry budget on every turn.
- The primary model endpoint has no failover, so its outage is a total outage.
- You are about to add a retry to a write — stop and read step 2 first.
Steps
- Bound every call with a deadline. Wrap each tool/model call so exceeding a timeout raises a clear error instead of hanging. Run sync tools in a worker thread so the deadline can actually fire on the event loop.
- Retry only idempotent reads, never writes. Retrying a non-idempotent action (restart, resolve, charge) can apply it twice. Retry reads with bounded, exponential backoff; leave writes to run exactly once behind human confirmation.
- Add a circuit breaker for dead dependencies. After N consecutive failures, open the breaker and fail fast (shed load) until a cooldown elapses, then let one trial call test recovery. Keep it opt-in so default behavior stays retry-only, and emit a metric each time it opens.
- Fail over the model only to a validated fallback. Try a primary model; on a retriable
429/5xxbefore any response, fall back to a secondary you have evaluated. Never fail over on a4xxor an ambiguous408(the request may already be billed), never switch mid-stream (it splices two answers), and prefer a smaller same-provider model so failover keeps your cost and privacy properties. Prefer the framework primitive (ADK'sFallbackModel) over a hand-rolled wrapper: it also restores the request before the next attempt.
Reference implementation
From the AgentOps Open Course (agent modules live under agents/python/src/agent/):
resilience.py—with_resilience(deadline + bounded retry, never on writes).circuit.py— a deterministic, clock-injectableCircuitBreaker.model.py— ADK'sFallbackModelwrapping a primary and a validated fallback.- Course chapters
4.5. Guardrailsand5.4. Model Gateway.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 29d ago Changed 1fab8a7dd636
- 1mo ago First seen · 36 lines · 64 tokens per session scan A 3d238775b7c5
agent-resilience is a skill published in the GitHub repository MLOps-Courses/agentops-open-course (2 stars, last pushed yesterday), licensed MIT. It adds 64 tokens to every session and 650 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
skill-release-gate
Evaluate an Agent Skill bundle for structural integrity, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity, and target-host portability before release.
migration-review
Review database migration files when a change adds or modifies paths under migrations/. Use it before merge to collect forward, rollback, locking, and data-safety evidence.
orchard-release
Check deployment evidence and recovery conditions.
mirrord-prev-env
Help users create and manage mirrord preview environments — running a modified service as an isolated pod in a shared Kubernetes cluster, scoped by an environment key and HTTP/queue traffic filtering, so teams can validate and review changes against real traffic without affecting live services. Use when a developer…
mirrord-operator
Help users install and configure the mirrord Operator for team/enterprise environments. Use when users ask about operator setup, Helm installation, cloud API key or license configuration, air-gapped/offline licensing, enabling features (queue splitting, DB branching, preview environments, multi-cluster), internal…
orchard-review
Review a release proposal.