agentdebugx 0.1.0__py3-none-any.whl
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.
- agentdebug/__init__.py +65 -0
- agentdebug/adapters/__init__.py +10 -0
- agentdebug/adapters/base.py +22 -0
- agentdebug/adapters/langgraph.py +261 -0
- agentdebug/adapters/otel.py +151 -0
- agentdebug/adapters/raw.py +134 -0
- agentdebug/analyzers.py +152 -0
- agentdebug/attribution.py +230 -0
- agentdebug/cli.py +272 -0
- agentdebug/events.py +114 -0
- agentdebug/instrumentation.py +57 -0
- agentdebug/judges.py +258 -0
- agentdebug/llm.py +165 -0
- agentdebug/models.py +169 -0
- agentdebug/recorder.py +183 -0
- agentdebug/recovery.py +113 -0
- agentdebug/storage.py +167 -0
- agentdebug/taxonomy.py +271 -0
- agentdebug/ui/__init__.py +14 -0
- agentdebug/ui/server.py +260 -0
- agentdebugx-0.1.0.dist-info/METADATA +217 -0
- agentdebugx-0.1.0.dist-info/RECORD +25 -0
- agentdebugx-0.1.0.dist-info/WHEEL +4 -0
- agentdebugx-0.1.0.dist-info/entry_points.txt +3 -0
- agentdebugx-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentdebugx
|
|
3
|
+
Version: 0.1.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: langgraph
|
|
30
|
+
Provides-Extra: otel
|
|
31
|
+
Provides-Extra: ui
|
|
32
|
+
Requires-Dist: httpx (>=0.24,<1.0)
|
|
33
|
+
Requires-Dist: pydantic (>=1.10,<3.0)
|
|
34
|
+
Project-URL: Documentation, https://github.com/ulab-uiuc/AgentDebugX/tree/main/docs
|
|
35
|
+
Project-URL: Homepage, https://github.com/ulab-uiuc/AgentDebugX
|
|
36
|
+
Project-URL: Repository, https://github.com/ulab-uiuc/AgentDebugX
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# AgentDebugX
|
|
40
|
+
|
|
41
|
+
AgentDebugX is an open-source framework for tracing, diagnosing, and recovering
|
|
42
|
+
from failures in agentic AI systems. It is packaged as `agentdebug` so existing
|
|
43
|
+
agent stacks can add structured debugging with a small import:
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from agentdebug import AgentDebug, EventType, SQLiteTraceStore
|
|
47
|
+
|
|
48
|
+
debugger = AgentDebug(store=SQLiteTraceStore(".agentdebug/errors.sqlite"))
|
|
49
|
+
|
|
50
|
+
with debugger.trace(goal="Book a refundable flight", framework="my-agent") as trace:
|
|
51
|
+
trace.record(EventType.PLAN, agent_name="planner", output="Search flights first")
|
|
52
|
+
trace.record(
|
|
53
|
+
EventType.TOOL_RESULT,
|
|
54
|
+
agent_name="browser",
|
|
55
|
+
error="Timeout while loading checkout page",
|
|
56
|
+
step_index=3,
|
|
57
|
+
)
|
|
58
|
+
report = trace.analyze()
|
|
59
|
+
|
|
60
|
+
print(report.summary)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Vision
|
|
64
|
+
|
|
65
|
+
Most observability tools show what an agent did. AgentDebugX aims to explain why
|
|
66
|
+
it failed, who or which module caused the issue, when the first critical error
|
|
67
|
+
occurred, and what should be changed next.
|
|
68
|
+
|
|
69
|
+
The long-term scope is:
|
|
70
|
+
|
|
71
|
+
- A portable trajectory IR for single-agent, multi-agent, tool-use, UI, and
|
|
72
|
+
multimodal runs.
|
|
73
|
+
- An agentic error database for storing traces, diagnostic reports, taxonomy
|
|
74
|
+
labels, artifacts, and recovery outcomes.
|
|
75
|
+
- Automated failure localization across step, module, agent, and run levels.
|
|
76
|
+
- Automated taxonomy generation that clusters new failures and proposes new
|
|
77
|
+
labels when existing taxonomies are insufficient.
|
|
78
|
+
- Recovery suggestions that can be used by humans, CI workflows, or self-healing
|
|
79
|
+
agents.
|
|
80
|
+
- UI and notebook experiences for timeline debugging, attribution, replay, and
|
|
81
|
+
dataset curation.
|
|
82
|
+
|
|
83
|
+
## Current Status
|
|
84
|
+
|
|
85
|
+
This repository now contains the first framework skeleton:
|
|
86
|
+
|
|
87
|
+
- `agentdebug.models`: normalized event, artifact, trajectory, taxonomy, and
|
|
88
|
+
diagnostic report schemas.
|
|
89
|
+
- `agentdebug.recorder`: high-level `AgentDebug` and `TraceSession` APIs.
|
|
90
|
+
- `agentdebug.analyzers`: deterministic baseline analyzer for immediate local
|
|
91
|
+
feedback.
|
|
92
|
+
- `agentdebug.taxonomy`: seed taxonomy inspired by AgentDebug, MAST, Who&When,
|
|
93
|
+
AgentRx, AgentSight, and multimodal extensions.
|
|
94
|
+
- `agentdebug.storage`: JSONL and SQLite trace stores.
|
|
95
|
+
- `agentdebug.instrumentation`: lightweight function/tool tracing helper.
|
|
96
|
+
- `agentdebug.cli`: initial `agentdebug analyze` command.
|
|
97
|
+
|
|
98
|
+
Many advanced modules are intentionally not implemented yet. The design docs
|
|
99
|
+
spell out the proposed path before we lock into heavy abstractions.
|
|
100
|
+
|
|
101
|
+
## Install
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
# From PyPI (distribution name: agentdebugx; import as `agentdebug`)
|
|
105
|
+
pip install agentdebugx
|
|
106
|
+
|
|
107
|
+
# With the optional local dashboard
|
|
108
|
+
pip install 'agentdebugx[ui]'
|
|
109
|
+
|
|
110
|
+
# With LangChain/LangGraph callback adapter
|
|
111
|
+
pip install 'agentdebugx[langgraph]'
|
|
112
|
+
|
|
113
|
+
# With OpenTelemetry GenAI export shim
|
|
114
|
+
pip install 'agentdebugx[otel]'
|
|
115
|
+
|
|
116
|
+
# Everything
|
|
117
|
+
pip install 'agentdebugx[all]'
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
From source:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
pip install -e . # or: poetry install
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Quick Start
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from agentdebug import AgentDebug, EventType
|
|
130
|
+
from agentdebug.models import model_to_json
|
|
131
|
+
|
|
132
|
+
debugger = AgentDebug()
|
|
133
|
+
trajectory = debugger.start_trace(
|
|
134
|
+
goal="Find a paper and summarize the method",
|
|
135
|
+
framework="custom-react-agent",
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
debugger.record_event(
|
|
139
|
+
trajectory,
|
|
140
|
+
EventType.LLM_CALL,
|
|
141
|
+
agent_name="researcher",
|
|
142
|
+
module="planning",
|
|
143
|
+
step_index=1,
|
|
144
|
+
input="Find the latest AgentDebug paper",
|
|
145
|
+
)
|
|
146
|
+
debugger.record_event(
|
|
147
|
+
trajectory,
|
|
148
|
+
EventType.TOOL_RESULT,
|
|
149
|
+
agent_name="search",
|
|
150
|
+
module="action",
|
|
151
|
+
step_index=2,
|
|
152
|
+
error="JSON schema validation failed: missing parameter query",
|
|
153
|
+
)
|
|
154
|
+
debugger.finish_trace(trajectory, success=False)
|
|
155
|
+
|
|
156
|
+
report = debugger.analyze(trajectory)
|
|
157
|
+
print(model_to_json(report, indent=2))
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
CLI:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Run the rule-based analyzer (works offline, no LLM)
|
|
164
|
+
agentdebug analyze examples/sample_trace.json --out .agentdebug/report.json
|
|
165
|
+
|
|
166
|
+
# List traces in a store
|
|
167
|
+
agentdebug list --store-sqlite .agentdebug/errors.sqlite
|
|
168
|
+
|
|
169
|
+
# Run the LLM judge (requires AGENTDEBUG_LLM_BASE_URL + AGENTDEBUG_LLM_API_KEY)
|
|
170
|
+
agentdebug judge examples/sample_trace.json --attribute
|
|
171
|
+
|
|
172
|
+
# Launch the local dashboard at http://127.0.0.1:7777
|
|
173
|
+
agentdebug serve --store-sqlite .agentdebug/errors.sqlite
|
|
174
|
+
|
|
175
|
+
# Diagnose which adapters / integrations are available
|
|
176
|
+
agentdebug doctor
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
End-to-end demo (judge + attribution + Reflexion recovery, all live against an
|
|
180
|
+
LLM): `examples/llm_judge_demo.py`.
|
|
181
|
+
|
|
182
|
+
## Benchmark
|
|
183
|
+
|
|
184
|
+
`scripts/eval_v0_1.py` runs the rule analyzer + LLM judge + All-at-Once
|
|
185
|
+
attributor across six realistic failing traces (action/format,
|
|
186
|
+
planning/loop, verification, system/tool error, multi-agent handoff loss,
|
|
187
|
+
memory retrieval). Latest results:
|
|
188
|
+
[docs/benchmarks/v0_1_smoke.md](docs/benchmarks/v0_1_smoke.md).
|
|
189
|
+
|
|
190
|
+
## Documentation
|
|
191
|
+
|
|
192
|
+
Narrative (paper-style):
|
|
193
|
+
|
|
194
|
+
- [Research Survey](docs/RESEARCH_SURVEY.md)
|
|
195
|
+
- [Open-Source Development Plan](docs/OPEN_SOURCE_DEVELOPMENT_PLAN.md)
|
|
196
|
+
- [Seed Error Taxonomy](docs/ERROR_TAXONOMY.md)
|
|
197
|
+
|
|
198
|
+
Engineering spec (numbered docs 00–18):
|
|
199
|
+
|
|
200
|
+
- [docs/README.md](docs/README.md) — full doc index
|
|
201
|
+
- [docs/00_overview.md](docs/00_overview.md) — vision + north-star UX
|
|
202
|
+
- [docs/02_architecture.md](docs/02_architecture.md) — 7-layer architecture
|
|
203
|
+
- [docs/18_comparison_codex_vs_design.md](docs/18_comparison_codex_vs_design.md) — Codex scaffold ↔ design-spec reconciliation that drove v0.1
|
|
204
|
+
|
|
205
|
+
## Development
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
pytest
|
|
209
|
+
mypy --strict ./
|
|
210
|
+
ruff check .
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
[MIT License](LICENSE) — see the `LICENSE` file. Original template copyright
|
|
216
|
+
Haofei Yu, 2024; additions copyright ULab @ UIUC and contributors, 2026.
|
|
217
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
agentdebug/__init__.py,sha256=Y9adDsz-0koIlt1C7WFNVapd_58f3K97oCERFteMiQc,1667
|
|
2
|
+
agentdebug/adapters/__init__.py,sha256=1qNLYJp-jYzvtZG4cjNB6Zrb5tCeDiPIzDUGOV5s6b8,361
|
|
3
|
+
agentdebug/adapters/base.py,sha256=3wzD1kzpAjyLV3l8OKBkJvqstq5XvDFBizCMRz7_hOg,426
|
|
4
|
+
agentdebug/adapters/langgraph.py,sha256=-r7phjKOWLq2propMYc9rXM5_FD2z-YbISDYEH0rjYg,8884
|
|
5
|
+
agentdebug/adapters/otel.py,sha256=OD9pgx4UbUCQBW-SocgUATEVt8_Ow_9xjAmsezB5K9E,5001
|
|
6
|
+
agentdebug/adapters/raw.py,sha256=rRHinUMMsgn_7knOgGJrW05lw23Cu3-nd-o3OH3INTE,4035
|
|
7
|
+
agentdebug/analyzers.py,sha256=sCnq4I1aKrlJ38fNfExlki-hZQxu_gLpEECGDHHII00,6481
|
|
8
|
+
agentdebug/attribution.py,sha256=GRZHgDTFmwwB6lfilVcpaWcjkNikjo_RyjQdtiCdJYM,7616
|
|
9
|
+
agentdebug/cli.py,sha256=5L2EGEOqvUClk6hHYHXQxp7y319XhR5nEuo47fHbKYg,9361
|
|
10
|
+
agentdebug/events.py,sha256=SSFZ25h7wmcNNA62mPTXGGPBfy_oQhjV63GTEzuWh9I,3767
|
|
11
|
+
agentdebug/instrumentation.py,sha256=TH_XfBJDOLlC84UHBsPBGk6MYh_9sT29j3pnBSQjitY,1778
|
|
12
|
+
agentdebug/judges.py,sha256=gROWzmojukyEa1lgTbGP28EmSp_GQzbQdR7aQStN7nY,9173
|
|
13
|
+
agentdebug/llm.py,sha256=z2pEIIEyWCn9iPitpmLENJGqvUI4v05sI11jetBWQZ4,5081
|
|
14
|
+
agentdebug/models.py,sha256=kyZGA1w9CWc1oUOx1N9uJdUqur_tWHQjv88iFPNKm88,5269
|
|
15
|
+
agentdebug/recorder.py,sha256=Hsc-qQhs9vW6CdfJBO3QM2kTlvM0CLVaxZPuYSysdMQ,5724
|
|
16
|
+
agentdebug/recovery.py,sha256=WQMgVrXrwNg1qwT-pLmjS0qcPCCMtMyZ23Wi9VcLUdI,3748
|
|
17
|
+
agentdebug/storage.py,sha256=EcdqS0dBRpQaCpfN2TzlxhMeb7-1PXcmXLFm0rPzegs,5664
|
|
18
|
+
agentdebug/taxonomy.py,sha256=dihuCc8ssDpj6UAUpmNsJH9WTKVGNLujlf4KRhZ4G5Y,10882
|
|
19
|
+
agentdebug/ui/__init__.py,sha256=pLaWskh1Hp6l0143ZMQZaebHZIsyVHVp_NYsQLvsBEQ,377
|
|
20
|
+
agentdebug/ui/server.py,sha256=iypQa52GF5DYGnctE0s-AISxL4F38U4Jhrbknc1ofCw,11136
|
|
21
|
+
agentdebugx-0.1.0.dist-info/METADATA,sha256=-rRxCt3he-aIBLqR59I3VE9f98FgSDm_PxIck3WZCac,7158
|
|
22
|
+
agentdebugx-0.1.0.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
|
|
23
|
+
agentdebugx-0.1.0.dist-info/entry_points.txt,sha256=1ZdBNkp0PhtG5twTZr7qR31iMmTAdNot7RIP8jPk9u8,50
|
|
24
|
+
agentdebugx-0.1.0.dist-info/licenses/LICENSE,sha256=OJ0AZSqup6hw4RKMld9xcVgPNHhWs5k_igiQ8aHPCa4,1066
|
|
25
|
+
agentdebugx-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Haofei Yu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|