# Agent Failure Analyzer: Find Why AI Agent Runs Fail

> Find why your AI agent runs fail from their real logs: tool errors, rate limits, context overflows and cut-off answers grouped into ranked root causes, with confidence levels and a CI gate.

Agent Failure Analyzer: Find Why AI Agent Runs Fail is a paid AI agent skill on Agensi by AGI Tools, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9.99 (one-time purchase)
- Creator: [AGI Tools](https://www.agensi.io/creators/agi-tools)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0.1
- Last updated: 2026-11-28
- Security: scan passed (2026-11-28); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/agent-failure-analyzer-find-why-ai-agent-runs-fail
- Tags: debugging, ai-agents, llm-ops, observability, root-cause-analysis, error-analysis, python, ci

## About this skill

Agent runs fail for a handful of reasons, but in logs they look like thousands of different errors: every timeout has its own duration, every rate limit its own request id. Agent Failure Analyzer reads your agent's real logs (OpenAI Chat Completions or Responses API, Anthropic Messages, chat transcripts) with a real Python program, finds the failure signals in every run and groups them into a short, ranked list of root causes.

It tells the first failure of a run apart from what followed it, failed retries from errors the agent recovered from, and gives every cause a confidence level, so you fix the right thing first.

Signals: tool errors and timeouts, API errors and rate limits, context overflows, answers cut at the token limit or stopped by a content filter, empty answers, undeclared tools and broken argument JSON. Refusals, call loops and unexplained failures are listed for review, never counted as failures.

Use --fail-above in CI to block a release when too many runs fail. Runs locally on Python 3.9+, standard library only, no API key; secrets and emails in excerpts are masked, and --no-values leaves excerpts out.

Built by AGI Tools. Not affiliated with Agensi, Anthropic or OpenAI.

## Requires

- Python 3.9+

Exported logs of your agent (JSONL or JSON). The skill itself needs no account, package or API key.

## Known limitations

It reads logs only and cannot see failures that left no trace; answers that report one are listed as unexplained.
Causes are inferred from the order of the signals; read the example records before concluding.
Tool errors are recognised from error flags, JSON error fields and common error openings.
Masking covers the listed secret formats only; use --no-values to leave every excerpt out.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Agent Failure Analyzer: Find Why AI Agent Runs Fail skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does it send my logs anywhere?

No. It reads the local files you name and makes no network connection.

### Which log formats does it read?

OpenAI Chat Completions and Responses API request/response logs, Anthropic Messages logs and chat transcripts, as JSONL or JSON. Other shapes must be exported to one of these first.

### Is the primary cause always the real root cause?

It is the earliest confirmed failure of the run, the most likely root cause. Each cause carries a confidence level and example records to check.

### Can I use it in CI?

Yes: --fail-above exits 1 above the failure rate you set, and when no run could be read.

### Does it judge answer quality?

No. It finds failures recorded in the logs. To test answer quality, build evals from your logs.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
