agentdebugx 0.2.12__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentdebugx-0.3.0/PKG-INFO +234 -0
- agentdebugx-0.3.0/README.md +174 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/05_adapters.md +54 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/14_api_reference.md +38 -1
- agentdebugx-0.3.0/docs/24_verification_report.md +239 -0
- agentdebugx-0.3.0/docs/25_cross_dataset_status.md +72 -0
- agentdebugx-0.3.0/docs/26_use_case_playbook.md +111 -0
- agentdebugx-0.3.0/docs/DEEPDEBUG_DESIGN.md +169 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/README.md +5 -3
- agentdebugx-0.3.0/docs/benchmarks/agenterrorbench_v0_2_12.md +172 -0
- agentdebugx-0.3.0/docs/benchmarks/cross_dataset_v0_2_12.md +170 -0
- agentdebugx-0.3.0/docs/benchmarks/gpt_5_4_mini_round.md +132 -0
- agentdebugx-0.3.0/docs/benchmarks/localizer_ablation.md +58 -0
- agentdebugx-0.3.0/docs/benchmarks/who_when_full_rerun.md +59 -0
- agentdebugx-0.3.0/docs/benchmarks/who_when_v0_2_12_paper_15.md +83 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/pyproject.toml +48 -5
- agentdebugx-0.3.0/src/agentdebug/__init__.py +327 -0
- agentdebugx-0.3.0/src/agentdebug/cli.py +1308 -0
- agentdebugx-0.3.0/src/agentdebug/core/__init__.py +61 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/core}/events.py +1 -1
- agentdebugx-0.3.0/src/agentdebug/core/gui_taxonomy.py +106 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/core}/llm.py +80 -1
- agentdebugx-0.3.0/src/agentdebug/core/llm_channel.py +156 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/core}/models.py +9 -1
- agentdebugx-0.3.0/src/agentdebug/core/plugins/__init__.py +30 -0
- agentdebugx-0.3.0/src/agentdebug/core/plugins/registry.py +133 -0
- agentdebugx-0.3.0/src/agentdebug/core/plugins/types.py +29 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/core}/storage.py +119 -6
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/core}/taxonomy.py +1 -1
- agentdebugx-0.3.0/src/agentdebug/diagnose/__init__.py +60 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/__init__.py +110 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/attribution.py +645 -152
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/hub/__init__.py +4 -4
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/hub/backend_base.py +1 -1
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/hub/backends.py +2 -2
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/hub/bundle.py +1 -1
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/hub/scrub.py +28 -4
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/integrations/__init__.py +16 -3
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/_templates.py +404 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/SKILL.md +85 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/references/analysis.md +66 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/references/cli_reference.md +227 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/references/formats.md +112 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/references/recovery.md +92 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/references/safety.md +11 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/agentdebug_skill/references/setup.md +140 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/claude_skill.py +123 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/integrations/debug_skill.py +185 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/integrations/openhands.py +9 -15
- agentdebugx-0.3.0/src/agentdebug/diagnose/actions/moe.py +429 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose/actions}/recovery.py +113 -5
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose}/analyzers.py +87 -46
- agentdebugx-0.3.0/src/agentdebug/diagnose/deep.py +322 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/deep_memory.py +432 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose}/detectors.py +27 -162
- agentdebugx-0.3.0/src/agentdebug/diagnose/deterministic.py +41 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/gui_rca.py +201 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/judge.py +5 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/diagnose}/judges.py +48 -16
- agentdebugx-0.3.0/src/agentdebug/diagnose/rules/__init__.py +47 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/rules/agenterrorbench.py +102 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/rules/base.py +49 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/rules/core.py +551 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/rules/gui.py +29 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/rules/registry.py +100 -0
- agentdebugx-0.3.0/src/agentdebug/diagnose/taxonomy_induction.py +544 -0
- agentdebugx-0.3.0/src/agentdebug/ingest/__init__.py +23 -0
- agentdebugx-0.3.0/src/agentdebug/ingest/adapters/__init__.py +52 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/adapters/base.py +1 -1
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/adapters/crewai.py +84 -46
- agentdebugx-0.3.0/src/agentdebug/ingest/adapters/gaia_odr.py +287 -0
- agentdebugx-0.3.0/src/agentdebug/ingest/adapters/importers.py +2368 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/adapters/langgraph.py +65 -4
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/adapters/openai_agents.py +3 -3
- agentdebugx-0.3.0/src/agentdebug/ingest/adapters/osworld.py +160 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/adapters/otel.py +3 -3
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/adapters/raw.py +3 -3
- agentdebugx-0.3.0/src/agentdebug/ingest/core/__init__.py +47 -0
- agentdebugx-0.3.0/src/agentdebug/ingest/importers.py +17 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/instrumentation.py +2 -2
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/ingest}/recorder.py +3 -3
- agentdebugx-0.3.0/src/agentdebug/inspect/__init__.py +30 -0
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/inspect}/traceback.py +11 -4
- {agentdebugx-0.2.12/src/agentdebug → agentdebugx-0.3.0/src/agentdebug/inspect}/ui/__init__.py +2 -2
- agentdebugx-0.3.0/src/agentdebug/inspect/ui/server.py +9324 -0
- agentdebugx-0.2.12/PKG-INFO +0 -250
- agentdebugx-0.2.12/README.md +0 -207
- agentdebugx-0.2.12/src/agentdebug/__init__.py +0 -119
- agentdebugx-0.2.12/src/agentdebug/adapters/__init__.py +0 -10
- agentdebugx-0.2.12/src/agentdebug/cli.py +0 -535
- agentdebugx-0.2.12/src/agentdebug/deep.py +0 -554
- agentdebugx-0.2.12/src/agentdebug/integrations/claude_skill.py +0 -161
- agentdebugx-0.2.12/src/agentdebug/ui/server.py +0 -644
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/LICENSE +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/00_overview.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/01_literature_survey.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/02_architecture.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/03_taxonomy.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/04_trace_schema.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/06_detectors.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/07_attribution.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/08_recovery.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/09_error_database.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/10_taxonomy_induction.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/11_multimodal.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/12_ui_dashboard.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/13_class_design.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/15_roadmap.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/16_governance.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/17_claude_code_design_patterns.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/18_comparison_codex_vs_design.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/19_error_hub.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/20_deep_debug.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/21_integrations.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/22_industry_track_paper_eval_plan.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/23_status_v0_2.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/ERROR_TAXONOMY.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/OPEN_SOURCE_DEVELOPMENT_PLAN.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/RESEARCH_SURVEY.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/benchmarks/e2e_v0_2_3.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/benchmarks/e2e_v0_2_4.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/benchmarks/v0_1_smoke.json +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/benchmarks/v0_1_smoke.md +0 -0
- {agentdebugx-0.2.12 → agentdebugx-0.3.0}/docs/benchmarks/who_when_v0_2_6_leaderboard.md +0 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentdebugx
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Portable error analysis, tracing, and recovery framework for agentic AI systems. Import as `agentdebug`.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: llm,agents,debugging,observability,failure-analysis,agent-debugging,agentic-ai,tracing,evaluation
|
|
8
|
+
Author: ULab @ UIUC
|
|
9
|
+
Author-email: ulab@illinois.edu
|
|
10
|
+
Requires-Python: >=3.9,<4.0
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
24
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
25
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
26
|
+
Classifier: Topic :: System :: Monitoring
|
|
27
|
+
Classifier: Typing :: Typed
|
|
28
|
+
Provides-Extra: all
|
|
29
|
+
Provides-Extra: crewai
|
|
30
|
+
Provides-Extra: gui
|
|
31
|
+
Provides-Extra: hub-hf
|
|
32
|
+
Provides-Extra: langgraph
|
|
33
|
+
Provides-Extra: openai-agents
|
|
34
|
+
Provides-Extra: otel
|
|
35
|
+
Provides-Extra: ui
|
|
36
|
+
Requires-Dist: anthropic ; extra == "gui"
|
|
37
|
+
Requires-Dist: backoff ; extra == "gui"
|
|
38
|
+
Requires-Dist: chromadb ; extra == "gui"
|
|
39
|
+
Requires-Dist: httpx (>=0.24,<1.0)
|
|
40
|
+
Requires-Dist: langchain-chroma ; extra == "gui"
|
|
41
|
+
Requires-Dist: langchain-core ; extra == "langgraph" or extra == "gui" or extra == "all"
|
|
42
|
+
Requires-Dist: langchain-openai ; extra == "gui"
|
|
43
|
+
Requires-Dist: matplotlib ; extra == "gui"
|
|
44
|
+
Requires-Dist: numpy ; extra == "gui"
|
|
45
|
+
Requires-Dist: openai ; extra == "gui"
|
|
46
|
+
Requires-Dist: pandas ; extra == "gui"
|
|
47
|
+
Requires-Dist: pillow ; extra == "gui"
|
|
48
|
+
Requires-Dist: pydantic (>=1.10,<3.0)
|
|
49
|
+
Requires-Dist: python-dotenv ; extra == "gui"
|
|
50
|
+
Requires-Dist: scikit-learn ; extra == "gui"
|
|
51
|
+
Requires-Dist: streamlit ; extra == "gui"
|
|
52
|
+
Requires-Dist: streamlit-adjustable-columns ; extra == "gui"
|
|
53
|
+
Requires-Dist: together ; extra == "gui"
|
|
54
|
+
Requires-Dist: tqdm ; extra == "gui"
|
|
55
|
+
Project-URL: Documentation, https://github.com/ulab-uiuc/AgentDebugX/tree/main/docs
|
|
56
|
+
Project-URL: Homepage, https://github.com/ulab-uiuc/AgentDebugX
|
|
57
|
+
Project-URL: Repository, https://github.com/ulab-uiuc/AgentDebugX
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
|
|
60
|
+
<div align="center">
|
|
61
|
+
|
|
62
|
+
# AgentDebugX
|
|
63
|
+
|
|
64
|
+
**Failure attribution and recovery for LLM agents — from a trace to a root cause to a fix.**
|
|
65
|
+
|
|
66
|
+
[](https://pypi.org/project/agentdebugx/)
|
|
67
|
+
[](LICENSE)
|
|
68
|
+
[](pyproject.toml)
|
|
69
|
+
|
|
70
|
+
[Website](https://www.agentdebugx.com) · [GitHub](https://github.com/AgentDebugX/AgentDebugX) · [Demo video](https://youtu.be/ztni6w0o_l8)
|
|
71
|
+
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
When an LLM-agent run fails, the visible crash is usually a downstream symptom of an
|
|
77
|
+
earlier decision — a dropped constraint, a stale memory read, a lost handoff. Tracing
|
|
78
|
+
tools show *what* happened; they leave you to work out *which* step was responsible,
|
|
79
|
+
*why*, and *what to change*.
|
|
80
|
+
|
|
81
|
+
**AgentDebugX** is a self-hostable debugging layer that closes that gap. Point it at a
|
|
82
|
+
live run or an exported log and it returns a typed diagnosis: the responsible step, a
|
|
83
|
+
taxonomy-grounded explanation with evidence, and a concrete fix you can rerun — all in a
|
|
84
|
+
local web console, a CLI, or an agentic skill your own agents can invoke.
|
|
85
|
+
|
|
86
|
+
Everything runs on your machine. No account, no hosted service, no data leaves your host.
|
|
87
|
+
|
|
88
|
+
## Highlights
|
|
89
|
+
|
|
90
|
+
- **DeepDebug** — a multi-turn, tool-using diagnosis agent that reads the whole trace,
|
|
91
|
+
re-investigates along its structure (cascade walk / bisect), cross-examines its own
|
|
92
|
+
hypotheses, and returns an auditable verdict with one concrete fix.
|
|
93
|
+
- **Cost-staged attribution** — free deterministic detectors → a single LLM-judge pass →
|
|
94
|
+
a family of localizers (all-at-once, step-by-step, binary-search) that trade cost for
|
|
95
|
+
resolution.
|
|
96
|
+
- **End-to-end recovery** — turn a diagnosis into a rerun-ready fix (Reflexion, CRITIC,
|
|
97
|
+
Self-Refine, AutoManual, saga-rollback recoverers), gated behind explicit human/policy
|
|
98
|
+
approval.
|
|
99
|
+
- **Portable trace schema** — one framework-agnostic format with runtime adapters
|
|
100
|
+
(LangGraph, CrewAI, OpenAI Agents SDK, OpenTelemetry, raw ReAct) and offline importers.
|
|
101
|
+
- **Local console** — a no-build single-page app served straight from the wheel; aligns
|
|
102
|
+
the agent's own trace with AgentDebugX's error trace, row by row.
|
|
103
|
+
- **Error Hub** — package scrubbed failure bundles (trace + diagnosis + fix) as CI
|
|
104
|
+
fixtures or a shareable cross-team corpus that doubles as DeepDebug's long-term memory.
|
|
105
|
+
- **Computer-use agents** — an OSWorld importer and a GUI root-cause mode reason over the
|
|
106
|
+
screenshot-and-action channel, not just text.
|
|
107
|
+
|
|
108
|
+
## Install
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install agentdebugx
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Optional extras (install only what you need):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pip install "agentdebugx[ui]" # local web console (FastAPI + Uvicorn)
|
|
118
|
+
pip install "agentdebugx[langgraph]" # LangGraph adapter
|
|
119
|
+
pip install "agentdebugx[gui]" # computer-use / OSWorld GUI RCA
|
|
120
|
+
pip install "agentdebugx[all]" # every optional integration
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The package is imported as `agentdebug`:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
import agentdebug
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Quick start (library)
|
|
130
|
+
|
|
131
|
+
Instrument a run with one context manager and analyze it in place:
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from agentdebug import AgentDebug, EventType
|
|
135
|
+
|
|
136
|
+
dbg = AgentDebug()
|
|
137
|
+
with dbg.trace(goal="Book a refundable NYC→SFO flight", framework="my-agent") as t:
|
|
138
|
+
t.record(EventType.PLAN, agent_name="planner",
|
|
139
|
+
output="search cheapest fares") # drops the 'refundable' constraint
|
|
140
|
+
t.record(EventType.TOOL_RESULT, agent_name="browser", step_index=3,
|
|
141
|
+
error="Checkout failed: refund_policy required")
|
|
142
|
+
report = t.analyze()
|
|
143
|
+
|
|
144
|
+
print(report.summary)
|
|
145
|
+
for finding in report.findings:
|
|
146
|
+
print(finding.failure_mode_id, finding.step_index, finding.confidence)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The report names the **responsible** step (the planner at step 0), not just the visible
|
|
150
|
+
crash (the browser at step 3).
|
|
151
|
+
|
|
152
|
+
## Quick start (local console)
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
pip install "agentdebugx[ui]"
|
|
156
|
+
agentdebug serve # opens the console at http://127.0.0.1:7777
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The console opens directly into the workspace — inspect traces, re-analyze any step with
|
|
160
|
+
the LLM judge or DeepDebug, request a debug continuation, and rerun from a chosen step.
|
|
161
|
+
It reads the same local store the library writes; nothing is uploaded.
|
|
162
|
+
|
|
163
|
+
## CLI
|
|
164
|
+
|
|
165
|
+
The `agentdebug` CLI exposes the full pipeline:
|
|
166
|
+
|
|
167
|
+
| Stage | Command | Purpose |
|
|
168
|
+
|-------|---------|---------|
|
|
169
|
+
| Normalize | `agentdebug ingest <export>` | Convert an external trace export into `AgentTrajectory` JSON |
|
|
170
|
+
| Diagnose | `agentdebug diagnose --store-jsonl <path>` | Detectors + attribution + recovery planning |
|
|
171
|
+
| Inspect | `agentdebug serve` / `inspect` | Local web console over a store |
|
|
172
|
+
| Deep dive | `agentdebug act deep <trace-id>` | Run the multi-turn DeepDebug agent |
|
|
173
|
+
| Recover | `agentdebug rerun --report <report.json>` | Rerun an agent from a diagnostic report |
|
|
174
|
+
| Share | `agentdebug hub push / pull` | Package or fetch scrubbed Error Hub bundles |
|
|
175
|
+
| Skills | `agentdebug integrations` | Emit host-runtime integrations (e.g. Claude Code skill) |
|
|
176
|
+
| Health | `agentdebug doctor` | Report adapter and integration availability |
|
|
177
|
+
|
|
178
|
+
LLM-backed commands read credentials from the environment:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
export AGENTDEBUG_LLM_BASE_URL=... # any OpenAI-compatible endpoint
|
|
182
|
+
export AGENTDEBUG_LLM_API_KEY=...
|
|
183
|
+
export AGENTDEBUG_LLM_MODEL=... # optional
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Run `agentdebug <command> --help` for the authoritative, version-specific flags.
|
|
187
|
+
|
|
188
|
+
## How it works
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
capture / import ──▶ AgentTrajectory ──▶ Detect ──▶ Attribute ──▶ Recover ──▶ Rerun
|
|
192
|
+
adapters, logs portable schema rules, responsible ranked from before/
|
|
193
|
+
(any framework) judge step/agent fixes at/after cause
|
|
194
|
+
│
|
|
195
|
+
└── hard cases ──▶ DeepDebug (multi-turn agent)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
A diagnosis is **layered on top of** the recorded trace, never written back into it, so
|
|
199
|
+
one run can be re-analyzed by any method, compared across runs, and shared without losing
|
|
200
|
+
its ground truth. See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for the DeepDebug
|
|
201
|
+
design and [`docs/TRACE_SCHEMA.md`](docs/TRACE_SCHEMA.md) for the event schema.
|
|
202
|
+
|
|
203
|
+
## Examples
|
|
204
|
+
|
|
205
|
+
The [`examples/`](examples/) directory contains runnable end-to-end scripts:
|
|
206
|
+
|
|
207
|
+
- `basic_usage.py` — record, analyze, inspect.
|
|
208
|
+
- `multi_agent_cascade.py` — upstream root-cause attribution across a handoff cascade.
|
|
209
|
+
- `langgraph/`, `crewai/`, `autogen_roundrobin_deepdebug.py` — framework adapters.
|
|
210
|
+
- `taxonomy_induction_demo.py` — propose new failure modes from a corpus.
|
|
211
|
+
- `claude_skill_integration/` — invoke AgentDebugX as an agentic skill.
|
|
212
|
+
|
|
213
|
+
## Repository layout
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
src/agentdebug/ core package: schema, detectors, judge, attribution, DeepDebug,
|
|
217
|
+
recovery, Error Hub, CLI, and the local web console (inspect/ui/)
|
|
218
|
+
cua_debugger/ computer-use / OSWorld GUI root-cause tooling
|
|
219
|
+
examples/ runnable usage examples
|
|
220
|
+
docs/ architecture and trace-schema reference
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Safety
|
|
224
|
+
|
|
225
|
+
AgentDebugX is **local-first**: traces stay on your machine and sharing is opt-in. A
|
|
226
|
+
diagnosed fix can write to the world, so recovery is **suggest-only** — application stays
|
|
227
|
+
behind an explicit human or policy gate. Diagnostic labels and fixes carry confidence and
|
|
228
|
+
evidence; treat them as ranked hypotheses, not ground truth. Configure redaction,
|
|
229
|
+
retention, and access control before collecting production traces.
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT — see [LICENSE](LICENSE).
|
|
234
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# AgentDebugX
|
|
4
|
+
|
|
5
|
+
**Failure attribution and recovery for LLM agents — from a trace to a root cause to a fix.**
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/agentdebugx/)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](pyproject.toml)
|
|
10
|
+
|
|
11
|
+
[Website](https://www.agentdebugx.com) · [GitHub](https://github.com/AgentDebugX/AgentDebugX) · [Demo video](https://youtu.be/ztni6w0o_l8)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
When an LLM-agent run fails, the visible crash is usually a downstream symptom of an
|
|
18
|
+
earlier decision — a dropped constraint, a stale memory read, a lost handoff. Tracing
|
|
19
|
+
tools show *what* happened; they leave you to work out *which* step was responsible,
|
|
20
|
+
*why*, and *what to change*.
|
|
21
|
+
|
|
22
|
+
**AgentDebugX** is a self-hostable debugging layer that closes that gap. Point it at a
|
|
23
|
+
live run or an exported log and it returns a typed diagnosis: the responsible step, a
|
|
24
|
+
taxonomy-grounded explanation with evidence, and a concrete fix you can rerun — all in a
|
|
25
|
+
local web console, a CLI, or an agentic skill your own agents can invoke.
|
|
26
|
+
|
|
27
|
+
Everything runs on your machine. No account, no hosted service, no data leaves your host.
|
|
28
|
+
|
|
29
|
+
## Highlights
|
|
30
|
+
|
|
31
|
+
- **DeepDebug** — a multi-turn, tool-using diagnosis agent that reads the whole trace,
|
|
32
|
+
re-investigates along its structure (cascade walk / bisect), cross-examines its own
|
|
33
|
+
hypotheses, and returns an auditable verdict with one concrete fix.
|
|
34
|
+
- **Cost-staged attribution** — free deterministic detectors → a single LLM-judge pass →
|
|
35
|
+
a family of localizers (all-at-once, step-by-step, binary-search) that trade cost for
|
|
36
|
+
resolution.
|
|
37
|
+
- **End-to-end recovery** — turn a diagnosis into a rerun-ready fix (Reflexion, CRITIC,
|
|
38
|
+
Self-Refine, AutoManual, saga-rollback recoverers), gated behind explicit human/policy
|
|
39
|
+
approval.
|
|
40
|
+
- **Portable trace schema** — one framework-agnostic format with runtime adapters
|
|
41
|
+
(LangGraph, CrewAI, OpenAI Agents SDK, OpenTelemetry, raw ReAct) and offline importers.
|
|
42
|
+
- **Local console** — a no-build single-page app served straight from the wheel; aligns
|
|
43
|
+
the agent's own trace with AgentDebugX's error trace, row by row.
|
|
44
|
+
- **Error Hub** — package scrubbed failure bundles (trace + diagnosis + fix) as CI
|
|
45
|
+
fixtures or a shareable cross-team corpus that doubles as DeepDebug's long-term memory.
|
|
46
|
+
- **Computer-use agents** — an OSWorld importer and a GUI root-cause mode reason over the
|
|
47
|
+
screenshot-and-action channel, not just text.
|
|
48
|
+
|
|
49
|
+
## Install
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install agentdebugx
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Optional extras (install only what you need):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install "agentdebugx[ui]" # local web console (FastAPI + Uvicorn)
|
|
59
|
+
pip install "agentdebugx[langgraph]" # LangGraph adapter
|
|
60
|
+
pip install "agentdebugx[gui]" # computer-use / OSWorld GUI RCA
|
|
61
|
+
pip install "agentdebugx[all]" # every optional integration
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The package is imported as `agentdebug`:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
import agentdebug
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Quick start (library)
|
|
71
|
+
|
|
72
|
+
Instrument a run with one context manager and analyze it in place:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from agentdebug import AgentDebug, EventType
|
|
76
|
+
|
|
77
|
+
dbg = AgentDebug()
|
|
78
|
+
with dbg.trace(goal="Book a refundable NYC→SFO flight", framework="my-agent") as t:
|
|
79
|
+
t.record(EventType.PLAN, agent_name="planner",
|
|
80
|
+
output="search cheapest fares") # drops the 'refundable' constraint
|
|
81
|
+
t.record(EventType.TOOL_RESULT, agent_name="browser", step_index=3,
|
|
82
|
+
error="Checkout failed: refund_policy required")
|
|
83
|
+
report = t.analyze()
|
|
84
|
+
|
|
85
|
+
print(report.summary)
|
|
86
|
+
for finding in report.findings:
|
|
87
|
+
print(finding.failure_mode_id, finding.step_index, finding.confidence)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The report names the **responsible** step (the planner at step 0), not just the visible
|
|
91
|
+
crash (the browser at step 3).
|
|
92
|
+
|
|
93
|
+
## Quick start (local console)
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install "agentdebugx[ui]"
|
|
97
|
+
agentdebug serve # opens the console at http://127.0.0.1:7777
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The console opens directly into the workspace — inspect traces, re-analyze any step with
|
|
101
|
+
the LLM judge or DeepDebug, request a debug continuation, and rerun from a chosen step.
|
|
102
|
+
It reads the same local store the library writes; nothing is uploaded.
|
|
103
|
+
|
|
104
|
+
## CLI
|
|
105
|
+
|
|
106
|
+
The `agentdebug` CLI exposes the full pipeline:
|
|
107
|
+
|
|
108
|
+
| Stage | Command | Purpose |
|
|
109
|
+
|-------|---------|---------|
|
|
110
|
+
| Normalize | `agentdebug ingest <export>` | Convert an external trace export into `AgentTrajectory` JSON |
|
|
111
|
+
| Diagnose | `agentdebug diagnose --store-jsonl <path>` | Detectors + attribution + recovery planning |
|
|
112
|
+
| Inspect | `agentdebug serve` / `inspect` | Local web console over a store |
|
|
113
|
+
| Deep dive | `agentdebug act deep <trace-id>` | Run the multi-turn DeepDebug agent |
|
|
114
|
+
| Recover | `agentdebug rerun --report <report.json>` | Rerun an agent from a diagnostic report |
|
|
115
|
+
| Share | `agentdebug hub push / pull` | Package or fetch scrubbed Error Hub bundles |
|
|
116
|
+
| Skills | `agentdebug integrations` | Emit host-runtime integrations (e.g. Claude Code skill) |
|
|
117
|
+
| Health | `agentdebug doctor` | Report adapter and integration availability |
|
|
118
|
+
|
|
119
|
+
LLM-backed commands read credentials from the environment:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
export AGENTDEBUG_LLM_BASE_URL=... # any OpenAI-compatible endpoint
|
|
123
|
+
export AGENTDEBUG_LLM_API_KEY=...
|
|
124
|
+
export AGENTDEBUG_LLM_MODEL=... # optional
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Run `agentdebug <command> --help` for the authoritative, version-specific flags.
|
|
128
|
+
|
|
129
|
+
## How it works
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
capture / import ──▶ AgentTrajectory ──▶ Detect ──▶ Attribute ──▶ Recover ──▶ Rerun
|
|
133
|
+
adapters, logs portable schema rules, responsible ranked from before/
|
|
134
|
+
(any framework) judge step/agent fixes at/after cause
|
|
135
|
+
│
|
|
136
|
+
└── hard cases ──▶ DeepDebug (multi-turn agent)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
A diagnosis is **layered on top of** the recorded trace, never written back into it, so
|
|
140
|
+
one run can be re-analyzed by any method, compared across runs, and shared without losing
|
|
141
|
+
its ground truth. See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) for the DeepDebug
|
|
142
|
+
design and [`docs/TRACE_SCHEMA.md`](docs/TRACE_SCHEMA.md) for the event schema.
|
|
143
|
+
|
|
144
|
+
## Examples
|
|
145
|
+
|
|
146
|
+
The [`examples/`](examples/) directory contains runnable end-to-end scripts:
|
|
147
|
+
|
|
148
|
+
- `basic_usage.py` — record, analyze, inspect.
|
|
149
|
+
- `multi_agent_cascade.py` — upstream root-cause attribution across a handoff cascade.
|
|
150
|
+
- `langgraph/`, `crewai/`, `autogen_roundrobin_deepdebug.py` — framework adapters.
|
|
151
|
+
- `taxonomy_induction_demo.py` — propose new failure modes from a corpus.
|
|
152
|
+
- `claude_skill_integration/` — invoke AgentDebugX as an agentic skill.
|
|
153
|
+
|
|
154
|
+
## Repository layout
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
src/agentdebug/ core package: schema, detectors, judge, attribution, DeepDebug,
|
|
158
|
+
recovery, Error Hub, CLI, and the local web console (inspect/ui/)
|
|
159
|
+
cua_debugger/ computer-use / OSWorld GUI root-cause tooling
|
|
160
|
+
examples/ runnable usage examples
|
|
161
|
+
docs/ architecture and trace-schema reference
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Safety
|
|
165
|
+
|
|
166
|
+
AgentDebugX is **local-first**: traces stay on your machine and sharing is opt-in. A
|
|
167
|
+
diagnosed fix can write to the world, so recovery is **suggest-only** — application stays
|
|
168
|
+
behind an explicit human or policy gate. Diagnostic labels and fixes carry confidence and
|
|
169
|
+
evidence; treat them as ranked hypotheses, not ground truth. Configure redaction,
|
|
170
|
+
retention, and access control before collecting production traces.
|
|
171
|
+
|
|
172
|
+
## License
|
|
173
|
+
|
|
174
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# 05 — Framework Adapters
|
|
2
2
|
|
|
3
|
+
AgentDebugX has two adapter families:
|
|
4
|
+
|
|
5
|
+
- **Runtime adapters** observe a live framework and emit `AgentEvent` records
|
|
6
|
+
while the agent runs.
|
|
7
|
+
- **Offline import adapters** read an exported log or benchmark rollout after
|
|
8
|
+
the run has finished and convert it into `AgentTrajectory`.
|
|
9
|
+
|
|
10
|
+
The shipped offline importer is `agentdebug.adapters.importers`. It is the
|
|
11
|
+
recommended entry point when users already have trace files from another
|
|
12
|
+
system:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
agentdebug convert external_trace.json --format auto --out trajectory.json
|
|
16
|
+
agentdebug analyze trajectory.json --traceback
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from agentdebug.adapters.importers import convert_file
|
|
21
|
+
|
|
22
|
+
trajectory = convert_file("external_trace.json", format="auto")
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`format="auto"` recognizes native `AgentTrajectory`, OpenAI-style `messages`,
|
|
26
|
+
rollout `conversations`, generic `event_list` exports, WebShop page logs,
|
|
27
|
+
OpenAI Agents span dumps, CrewAI events, and LangGraph/LangChain callback logs.
|
|
28
|
+
|
|
29
|
+
## 0.1 Analysis packs for imported traces
|
|
30
|
+
|
|
31
|
+
Deterministic analysis is also pack-oriented. The default `auto` setting loads
|
|
32
|
+
the generic `core` rules for every trace and adds benchmark-specific packs only
|
|
33
|
+
when the trajectory metadata indicates they apply. A pack can include both
|
|
34
|
+
single-event rules and cross-event trajectory rules.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
agentdebug analyze trajectory.json --rule-pack auto
|
|
38
|
+
agentdebug analyze trajectory.json --rule-pack core
|
|
39
|
+
agentdebug analyze trajectory.json --rule-pack core --rule-pack agenterrorbench
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The first shipped packs are:
|
|
43
|
+
|
|
44
|
+
- `core` — generic single-event rules for explicit errors, LLM limits, format
|
|
45
|
+
errors, parameter errors, wrong-tool signals, planning loops, handoff loss,
|
|
46
|
+
visual/perception signals, plus cross-event repeated-tool-call,
|
|
47
|
+
repeated-state, and step-budget rules.
|
|
48
|
+
- `agenterrorbench` — ALFWorld/WebShop-specific weak signals such as
|
|
49
|
+
`Nothing happens`, loaded only by explicit request or benchmark detection.
|
|
50
|
+
|
|
51
|
+
New packs should live under `agentdebug.rules.<pack_name>` and expose a
|
|
52
|
+
`build_event_rules()` and/or `build_trajectory_rules()` function returning
|
|
53
|
+
rule objects that implement the shared `EventRule` or `TrajectoryRule`
|
|
54
|
+
protocols from `agentdebug.rules.base`. `build_rules()` is still accepted as a
|
|
55
|
+
backward-compatible alias for event-only packs.
|
|
56
|
+
|
|
3
57
|
## 1. Adapter contract
|
|
4
58
|
|
|
5
59
|
Every adapter implements:
|
|
@@ -221,7 +221,8 @@ The public design above is the long-term `agentdebugx` contract. The current
|
|
|
221
221
|
package already ships a smaller but working `agentdebug` CLI:
|
|
222
222
|
|
|
223
223
|
```bash
|
|
224
|
-
agentdebug analyze <trajectory.json> [--suggest] [--traceback]
|
|
224
|
+
agentdebug analyze <trajectory.json> [--suggest] [--traceback] [--rule-pack auto|core|agenterrorbench|all]
|
|
225
|
+
agentdebug convert <external-trace.json|jsonl> [--format auto] --out trajectory.json
|
|
225
226
|
agentdebug list --store-sqlite .agentdebug/errors.sqlite
|
|
226
227
|
agentdebug show <trace_id> --store-sqlite .agentdebug/errors.sqlite
|
|
227
228
|
agentdebug judge <trajectory.json|trace_id> --attribute [--traceback]
|
|
@@ -238,6 +239,42 @@ agentdebug doctor
|
|
|
238
239
|
`--traceback` renders `AgentTraceback`, a Python-traceback-style cascade view
|
|
239
240
|
implemented by `agentdebug.traceback.format_traceback(report, trajectory)`.
|
|
240
241
|
DeepDebug can provide explicit cascade edges through
|
|
242
|
+
|
|
243
|
+
`agentdebug convert` is the offline import path for traces that were not
|
|
244
|
+
recorded by AgentDebugX. It normalizes common exported formats into
|
|
245
|
+
`AgentTrajectory` so the rest of the current CLI can operate on them:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
agentdebug convert webshop_rollout.jsonl --format auto --out trajectory.json
|
|
249
|
+
agentdebug analyze trajectory.json --traceback
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
The Python API is:
|
|
253
|
+
|
|
254
|
+
```python
|
|
255
|
+
from agentdebug.adapters.importers import convert_file, convert_payload
|
|
256
|
+
|
|
257
|
+
trajectory = convert_file("external_trace.json", format="auto")
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Supported import formats are native `AgentTrajectory`, `messages`,
|
|
261
|
+
`message_list`, `conversations`, `event_list`, `webshop_pages`,
|
|
262
|
+
`openai_agents_spans`, `crewai_events`, and `langgraph_callbacks`.
|
|
263
|
+
|
|
264
|
+
Deterministic analysis uses analysis packs. `auto` loads `core` for all traces
|
|
265
|
+
and adds `agenterrorbench` when the trajectory metadata/framework looks like
|
|
266
|
+
AgentErrorBench, ALFWorld, or WebShop. A pack can include single-event rules
|
|
267
|
+
and cross-event trajectory rules; `agentdebug analyze` runs both. Repeat
|
|
268
|
+
`--rule-pack` to compose packs:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
agentdebug analyze trajectory.json --rule-pack core --rule-pack agenterrorbench
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Every rule-based finding includes `metadata.rule_pack`, `metadata.rule_id`, and
|
|
275
|
+
`metadata.confidence_basis` for auditability.
|
|
276
|
+
The legacy `agentdebug.detectors` classes remain importable, but the default
|
|
277
|
+
deterministic entry point is `HeuristicAnalyzer().analyze(trajectory)`.
|
|
241
278
|
`finding.metadata['cascading_from_event_id']`; heuristic and single-pass judge
|
|
242
279
|
reports fall back to step-index ordering.
|
|
243
280
|
|