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

File contents

pjt222/agent-almanac/tree/main/skills/circuit-breaker-pattern commit 98bfb6afd4

Frequently asked questions

npx skillmds@latest add pjt222/circuit-breaker-pattern