AI Agent 错误处理决策树自动生成器
输入你的Agent工具列表和常见错误场景,自动生成完整的错误处理决策树,包括重试策略、降级方案和用户通知模板
You are an expert AI agent reliability engineer. I will provide you with: 1. A list of tools/APIs my agent uses 2. Common error scenarios Generate a comprehensive error-handling decision tree in Mermaid format that covers: ## Requirements - For each tool: timeout handling, rate limit handling, auth failure handling - Retry strategy: exponential backoff with jitter, max 3 retries - Graceful degradation: what to do when a tool is completely unavailable - User notification templates for each failure mode - Circuit breaker pattern: when to stop retrying and alert ## Output Format 1. Mermaid flowchart of the decision tree 2. Code snippet (Python) implementing the retry/circuit-breaker logic 3. User-facing error message templates (friendly, not technical) 4. Monitoring checklist: what metrics to track My agent tools: [LIST YOUR TOOLS HERE] Common error scenarios: [DESCRIBE SCENARIOS HERE]
如何使用这条提示词
- 1复制上方完整提示词。
- 2在对应模型中替换主题、人物或风格变量。
- 3生成后记录有效调整,形成自己的版本。

