返回提示词库
文本 · 通用大模型AI Agent 错误处理决策树自动生成器PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型AI 与 Agent

AI Agent 错误处理决策树自动生成器

输入你的Agent工具列表和常见错误场景,自动生成完整的错误处理决策树,包括重试策略、降级方案和用户通知模板

15浏览
完整提示词可替换花括号中的变量后直接使用

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]

2026/4/10

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。