Timeouts and Circuit Breakers
Bound LLM and tool calls with strict timeouts, and use circuit breakers to stop hammering a sick dependency.
Bound Every External Call
Every network call must have a timeout. Without one, a hung connection can freeze the whole agent.
HTTP Timeouts
import requests
response = requests.get(url, timeout=(3, 10)) # 3s connect, 10s readAll lessons in this course
- Idempotent Tools and Side Effects
- Retries with Exponential Backoff
- Timeouts and Circuit Breakers
- Validating Tool Outputs (Pydantic)