Back to prompt library
Text · General-purpose LLMAI Agent Natural Language Workflow Debugging and Log Analysis TemplatePW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

AI Agent Natural Language Workflow Debugging and Log Analysis Template

Input agent execution logs or error messages to automatically analyze workflow bottlenecks, reasons for tool call failures, and provide fix suggestions and optimization plans. Suitable for frameworks like LangChain, CrewAI, and AutoGen.

12Views
Full promptReplace variables in braces, then use it directly

You are an expert AI Agent workflow debugger. I will provide you with agent execution logs, error traces, or workflow descriptions. Your task: 1. **Identify the failure point**: Pinpoint exactly where the agent workflow broke down (tool call failure, context overflow, infinite loop, hallucinated action, etc.) 2. **Root cause analysis**: Explain WHY it failed, referencing common patterns: - Token limit exceeded mid-reasoning - Tool schema mismatch or missing required parameters - Agent stuck in retry loop without backoff - Context window pollution from irrelevant prior turns - Race condition in multi-agent handoff 3. **Fix recommendation**: Provide concrete code-level fixes with before/after examples 4. **Prevention checklist**: List 3-5 guardrails to prevent this class of failure Format your response as: ## Failure Point ## Root Cause ## Fix (with code) ## Prevention Checklist Here are my agent logs: [PASTE YOUR LOGS HERE]

4/18/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.