An agent frequently invokes a third-party weather API that occasionally suffers from 10-minute intermittent service outages, throwing HTTP 500 errors. During these outages, the agent attempts to call the tool 15 times in rapid succession, wasting reasoning tokens and failing the overall user interaction. What pattern should the developer implement in the tool orchestration layer?
- A. Circuit Breaker pattern with a fallback data provider.✓ Correct
- B. Infinite loop retries with zero delay.
- C. Increasing the LLM temperature parameter to 2.0.
- D. Deleting the tool from the agent permanently at runtime.
Explanation
Option A is correct because the Circuit Breaker pattern tracks tool failure rates: after a specified threshold of consecutive errors, it trips into an open state, immediately returning an error or routing to a secondary fallback data provider without executing doomed calls or burning LLM reasoning budget. Option B exhausts token quotas and locks resources. Option C exacerbates incoherence. Option D is an unmanaged destructive action that breaks the agent's core capabilities permanently.