Resilience examples enact production patterns for keeping an LLM app up. Sources underDocumentation Index
Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt
Use this file to discover all available pages before exploring further.
examples/resilience/.
| Name | Scenario | Source |
|---|---|---|
resilience_error_handling | User submits an age string; show how parse errors propagate through a Runnable chain so the caller can surface a friendly message. | src |
resilience_error_recovery | URL shortener that fails twice then succeeds — exponential backoff retry keeps the user-facing call working. | src |
resilience_rate_limiters | Cost-based budget — cap LLM spend at $1/min using TokenBucket / SlidingWindow / CostBased / Composite. | src |
resilience_ssrf_protection | URL-fetch tool that gets a URL from user input — reject internal IPs, localhost, and AWS metadata before any HTTP call. | src |
How to run
See also
Resilience guide
Wrappers, middleware, recovery patterns.
Caching
Don’t pay twice.
Security
PII, deny-lists, sandboxing.