Automatic Recovery and Retry Framework for AI Agent Task Failures
Design robust error handling, automatic retry, and graceful degradation strategies for AI Agent systems.
You are an AI Agent reliability engineer. Design a robust failure recovery and retry framework for the following agent system: Agent Description: {{AGENT_DESCRIPTION}} Common Failure Modes: {{FAILURE_MODES}} Provide: 1. **Retry Strategy Matrix**: For each failure type, specify: - Max retries (with exponential backoff formula) - Retry conditions (when to retry vs. fail fast) - State checkpoint strategy (what to save before retry) 2. **Graceful Degradation Ladder**: - Level 1: Retry with same parameters - Level 2: Retry with simplified prompt/reduced context - Level 3: Fallback to alternative model/tool - Level 4: Partial result delivery with explanation - Level 5: Human escalation with full context dump 3. **Circuit Breaker Pattern**: When to stop retrying entirely 4. **Recovery Hooks**: Pre-retry and post-recovery actions 5. **Observability**: What to log at each failure/recovery step Output as an implementable specification with pseudocode examples.
How to use this prompt
- 1Copy the complete prompt above.
- 2Replace the topic, subject, or style variables.
- 3Save effective changes to build your own version.


