Prompt LibraryAgents

AI Agent Run Postmortem Analysis Prompt

Diagnose a bad agentic run from its log instead of guessing.

The prompt

Below is the log of an agent run that went wrong.
Classify the root cause as one of: goal drift, bad tool description, missing tool, unbounded retry, context overflow, or genuine model error.
Quote the exact step where it went wrong.
Then propose the smallest change that prevents it, and say what it would break.

Log:
{{log}}

Replace the {{fields}} with your own context and tighten the rules to match your domain.

Share this prompt