Skip to main content

Debug Anything

debuganything (Python)

Debug Anything from Python. Observe a running process, container or pod — syscalls, CPU profiles, thread stacks, sockets, packets, heap retainers — and get findings that cite evidence. This package wraps the DebugAnything CLI (Node ≥ 22 required: npx -y debuganything is used automatically) and ships tool adapters for LangChain, LlamaIndex and CrewAI.

pip install debuganything                 # core (no deps)
pip install 'debuganything[langchain]'    # + LangChain StructuredTools
pip install 'debuganything[llamaindex]'   # + LlamaIndex FunctionTools
pip install 'debuganything[crewai]'       # + CrewAI BaseTools

Plain Python

from debuganything import DebugAnything

debuganything = DEA()                       # uses `debuganything` if installed, else `npx -y debuganything@latest`
print(da.readiness()["findings"])
s = da.attach(12345)             # pid, "my-container", "ns/pod", or a command
before = da.snapshot_memory(s)
# ... exercise the target ...
after = da.snapshot_memory(s)
diff = da.diff_runs(s, before["run_id"], after["run_id"])
for line in DebugAnything.findings(diff):
    print(line)                   # [high] heap_retainer: name=Array grew 2.0 KB → 50.1 MB (observed; e4,e1)
da.report(s, out="report.md")
da.detach(s)

Every call returns the Debug Anything ToolResult dict (ok, findings, evidence, limitations, suggested_next, artifacts). capture_traffic needs consent=True — ask your user first.

LangChain

from debuganything.langchain import dea_tools
from langgraph.prebuilt import create_react_agent

agent = create_react_agent(llm, dea_tools())
agent.invoke({"messages": [("user", "pid 12345 is slow — attach and tell me why, with evidence")]})

LlamaIndex

from debuganything.llamaindex import dea_tools
from llama_index.core.agent import ReActAgent

agent = ReActAgent.from_tools(dea_tools(), llm=llm, verbose=True)

CrewAI

from debuganything.crewai import dea_tools
from crewai import Agent

sre = Agent(role="SRE", goal="Diagnose the hung worker with evidence, never guess", tools=dea_tools(), llm=llm)

Or just use MCP

Any framework with MCP support (LangChain langchain-mcp-adapters, LlamaIndex McpToolSpec, CrewAI MCPServerAdapter, Claude Code, Codex, Cursor…) can run Debug Anything directly: {"command": "npx", "args": ["-y", "debuganything@latest", "serve"]}. Same 14 tools, same ToolResult, plus the guided prompts.

Safety

Debug Anything is read-only, never runs sudo, caps every tool at 60 s, redacts secrets in what it returns, and keeps raw artifacts under ~/.debuganything/sessions/. See docs/safety.md.

License and disclaimer

MIT. Provided "as is", without warranty of any kind; the authors accept no liability for any damage arising from use. Only observe systems you own or are explicitly authorized to debug — you are solely responsible for authorization and legal compliance. Findings are automated diagnostics, not professional advice. See the full DISCLAIMER.

Metadata

Release files for debuganything 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debuganything 1.0.0
File Size Uploaded
debuganything-1.0.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for debuganything 1.0.0
File Interpreter ABI Platform
debuganything-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / debuganything-1.0.0.tar.gz

Download URL debuganything-1.0.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5ee46d5167ac876197245d01f0f42171edce091fec626257737c90d7a86133e1
BLAKE2b-256 checksum
How to use checksums
9d2985eee612ba41f797ea4e158799d7c5325753a2caf7fec4dcef5b4a202b37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / debuganything-1.0.0-py3-none-any.whl

Download URL debuganything-1.0.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e5473ba96f91d720738c059c383c7a2b5c3ed95ff7da0c672c47947f4f73cd1
BLAKE2b-256 checksum
How to use checksums
0b85c4070696da3aaf74504a9d00c1d30e9a36662c8e4148cf83210b548b080d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page