Skip to main content

When your agent fails, this tells you exactly why.

Project description

AgentAutopsy

When your agent fails, this tells you exactly why.

Why this exists

Every time an AI agent fails, you get a useless stack trace. No context. No reason. No fix. AgentAutopsy gives you the exact failure step, root cause, and a verified fix — automatically.

demo

Python License Zero Config Works with

CLI

agentautopsy runs # see all agent runs agentautopsy replay # replay any failure agentautopsy stats # fix cache stats

Install

pip install agentautopsy

Examples

# Basic usage
import agentautopsy
agentautopsy.watch()

# LangChain
from agentautopsy import get_callback_handler
handler = get_callback_handler()
agent.run(input, config={"callbacks": [handler]})
# Slack alerts
export AGENTAUTOPSY_SLACK_WEBHOOK=https://hooks.slack.com/...

# Web UI
agentautopsy ui

# CLI
agentautopsy runs
agentautopsy replay <run_id>
agentautopsy stats

Usage

import agentautopsy
agentautopsy.watch()
# your existing agent code here — nothing else changes

AgentAutopsy automatically intercepts every LLM call, detects failures, finds root cause, outputs a verified fix, and caches it for next time.

Why AgentAutopsy vs LangSmith / Helicone?

Feature AgentAutopsy LangSmith Helicone
Works offline
Zero config
Replay failed runs partial
AI debug assistant
Prompt diffing partial
Divergence detection
Free and open source partial
No cloud required

Setup

Windows: set ANTHROPIC_API_KEY=your-key-here Mac/Linux: export ANTHROPIC_API_KEY=your-key-here Get your free key at console.anthropic.com

Set AGENTAUTOPSY_SLACK_WEBHOOK=your-webhook-url and AgentAutopsy will automatically alert your Slack channel when any agent fails.

Quick start

Create test_agent.py and paste this:

import agentautopsy
agentautopsy.watch()

Run: python test_agent.py

Works with

OpenAI, Anthropic, LangChain, any framework using openai or anthropic

Requirements

Python 3.11+, ANTHROPIC_API_KEY

License

Apache 2.0

Roadmap

  • VS Code extension
  • GitHub Actions integration
  • Multi-agent tracing
  • Auto-fix applier
  • LangChain support
  • Slack alerts
  • Web UI
  • Prompt diffing
  • Divergence detection

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentautopsy-1.2.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentautopsy-1.2.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

Details for the file agentautopsy-1.2.0.tar.gz.

File metadata

  • Download URL: agentautopsy-1.2.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for agentautopsy-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e3b37313185023fe99c918b5fcfeaee0088eefe5701442ee703552a703e878fa
MD5 0ce111acdbbd7ec5a6423ac47664f5d4
BLAKE2b-256 9f9db97ff84e61c2f8574ad7329f00e8f286fd227eaa5c4c014ed460d67e9b6a

See more details on using hashes here.

File details

Details for the file agentautopsy-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentautopsy-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for agentautopsy-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b5b735a5223579921cb8a550a172336c1481f2129b9bc0759e78e3c7170a3b
MD5 ccfc17971356f88fe9f7ca47f515ec7f
BLAKE2b-256 6989c0cc9b912114c3cefbf887cf2f5dee013aea1f91abdb97e8b67ce4ae0cf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page