AI Agent Prompts

Agent Failure Post-Mortem Analyzer

Analyzes a transcript or log of an AI agent that failed, went off-track, or produced a bad output, and identifies the root cause with a specific prompt or logic fix.

FreeClaudeChatGPT
Best for

Developers debugging AI agents in production or during testing who need a structured root-cause analysis instead of guessing why an agent went off the rails.

Suitable LLM groups
FrontierReasoning
Download Prompt.md
Prompt
You are an AI systems debugger who specializes in diagnosing why agents fail or behave unexpectedly.

Agent's system prompt (or relevant excerpt): {{system_prompt_excerpt}}
Transcript/log of the failed run: {{failure_transcript_or_log}}
What the agent was supposed to do: {{intended_behavior}}
What actually happened: {{actual_behavior}}

Do the following:
1. Pinpoint the exact step in the transcript where the agent's behavior first diverged from what was intended (not just where the failure became obvious, but where it actually started going wrong).
2. Classify the root cause into one of these categories: ambiguous instructions, missing context/information the agent needed, a tool call error or misuse, the agent misunderstanding the user's actual intent, a looping/repetition failure, or the agent correctly following instructions that were themselves flawed.
3. Explain the root cause in plain terms, quoting or referencing the specific transcript moment that supports the diagnosis.
4. Propose a specific, concrete fix: either an exact edit to the system prompt, a suggested tool/logic change, or an added guardrail, and explain how it would have prevented this specific failure.

How to use

  1. Paste the relevant system prompt and the full transcript or log of the failed agent run.
  2. Describe clearly what the agent was supposed to do versus what it actually did.
  3. Apply the proposed fix directly to your system prompt or agent logic.
  4. Re-run a similar scenario after the fix to confirm the specific failure mode has been resolved.

Example input

System prompt excerpt: 'Search the web for relevant pricing data and summarize findings.' Transcript: [agent searches once, gets a thin result, then fabricates additional pricing figures not found in the search results]. Intended behavior: Only report verified pricing data. Actual behavior: Agent invented plausible-sounding numbers.

Example output

A diagnosis pinpointing the divergence at the moment the agent received a thin search result and continued generating content instead of stopping or searching again, classified as 'missing context/information the agent needed' combined with an instruction gap around what to do when search results are insufficient, and a specific fix adding an explicit line to the system prompt instructing the agent to state 'insufficient data found' rather than fabricate when search results don't fully answer the query.

Customization tips

  • If the failure involved a specific tool call, include the raw tool call and its response in the transcript for a more precise diagnosis.
  • For recurring failure patterns across multiple runs, paste 2-3 transcripts at once and ask for a shared root cause across all of them.
  • If you suspect the issue is a flawed underlying instruction rather than an agent error, say so explicitly to guide the classification.

Tags

#ai-agents#debugging#post-mortem#agent-reliability#prompt-engineering

FAQ

What is this prompt for?
It analyzes a failed AI agent run to pinpoint exactly where and why the behavior diverged from what was intended, then proposes a specific, concrete fix to prevent that same failure from happening again.
How should I customize it?
Provide the full transcript or log along with the relevant system prompt, and be specific about the gap between intended and actual behavior, since vague failure descriptions produce vague diagnoses.
Are there any limitations?
The diagnosis is based on the transcript provided; if the failure involves external system state not captured in the log, the root cause analysis may be incomplete without that additional context.
How is it different from a basic prompt?
Rather than a general 'what went wrong' summary, it pinpoints the exact divergence moment, classifies the failure into a specific root-cause category, and proposes a concrete, testable fix tied directly to that diagnosis.
Free

Agent System Prompt Stress Tester

Pressure-tests an AI agent's system prompt by generating edge-case user inputs designed to expose ambiguity, scope creep, or unsafe behavior before deployment.

ClaudeChatGPT
#ai-agents#system-prompts#prompt-testing
Free

Agent Task Decomposition Planner

Breaks a broad goal into a structured set of sub-tasks an AI agent can execute step by step, with clear success criteria and handoff points for human review.

ClaudeChatGPT
#ai-agents#task-planning#agent-architecture
Free

Multi-Agent Role Designer

Designs a clean division of labor for a multi-agent system, defining each sub-agent's role, boundaries, and handoff protocol so agents don't overlap or conflict.

ClaudeChatGPT
#ai-agents#multi-agent-systems#agent-architecture

Related Skills

Agent Systems & LLM WorkflowsFree

Agent Prompt & Tool Spec Designer

Designs a complete system prompt and tool specification for an LLM agent from a description of what the agent should do.

ClaudeChatGPTCursor
#llm-agents#prompt-engineering#system-prompt
Code ImprovementFree

Debugging and Root Cause Analyst

Investigate software defects systematically using evidence, hypotheses, reproduction, instrumentation, isolation, and verification.

ClaudeChatGPTCursor
#debugging#root cause analysis#bug investigation
Code ImprovementFree

Code Review & Refactor Assistant

Reviews a pasted code snippet for bugs, readability, and performance issues, then delivers a prioritized refactor with explanations for each change.

ClaudeChatGPTCursor
#code review#refactoring#software engineering

Related Articles

Article · AI Agents

How do I evaluate an AI agent before trusting it?

Evaluate an AI agent with realistic tasks, edge cases, tool failures, permission checks, output rubrics, logs, and human review before using it in production.

Jul 9, 20268 min read
Read How do I evaluate an AI agent before trusting it?
Article · AI Agents

How is an AI agent different from a chatbot?

A chatbot usually answers messages. An AI agent can plan, use tools, follow a workflow, make decisions within boundaries, and sometimes take actions after approval.

Jul 9, 20268 min read
Read How is an AI agent different from a chatbot?
Article · AI Agents

What is an AI agent in simple words?

An AI agent is a system that uses a model to reason through a task and may use tools, memory, or workflows to complete steps beyond a single chat response.

Jul 9, 20268 min read
Read What is an AI agent in simple words?