Circuit Breaker Pattern

Implement circuit breaker logic for agentic tool calls — tracking tool health, transitioning between closed/open/half-open states, reducing task scope when tools fail, routing to alternatives via capability maps, and enforcing failure budgets to prevent error accumulation. Separates orchestration (deciding what to attempt) from execution (calling tools), following the expeditor pattern. Use when building agents that depend on multiple tools with varying reliability, designing fault-tolerant agentic workflows, recovering gracefully from tool outages mid-task, or hardening existing agents against cascading tool failures.

pjt222 Updated 44 repo stars

File contents

pjt222/agent-almanac commit 98bfb6afd4

Frequently asked questions

npx get-skill add pjt222/circuit-breaker-pattern