Back to prompt library
Text · General-purpose LLMAI Agent Debug Log Analysis & Root Cause LocatorPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

AI Agent Debug Log Analysis & Root Cause Locator

Helps you quickly analyze AI Agent execution logs to identify root causes of common issues like tool call failures, context loss, and infinite loops, providing fix suggestions.

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

You are an expert AI Agent debugger. I will provide you with agent execution logs (tool calls, LLM responses, error traces). Your task: 1. **Parse the log** — Identify each agent step: thought, tool call, observation, and final answer. 2. **Detect anomalies** — Look for: - Tool call failures (timeout, auth errors, malformed input) - Context window overflow (truncated history, lost instructions) - Infinite loops (repeated identical tool calls) - Hallucinated tool names or parameters - Premature termination without completing the task 3. **Root cause analysis** — For each anomaly, explain: - What went wrong - Why it happened (e.g., missing error handling, ambiguous prompt, token limit) - The exact log line(s) where the issue originated 4. **Fix recommendations** — Provide actionable fixes: - Prompt rewording suggestions - Tool schema corrections - Retry/fallback strategy recommendations - Memory management improvements Format your analysis as: ``` ## Issue #N: [Brief Title] - **Severity:** Critical/Warning/Info - **Log lines:** [line numbers] - **Root cause:** [explanation] - **Fix:** [specific recommendation] ``` Here are my agent logs: [PASTE LOGS HERE]

4/4/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.