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 = DebugAnything()                       # 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.1

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.1
File Size Uploaded
debuganything-1.0.1.tar.gz 8.8 kB Details

Built distribution (wheel)

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

Total release size: 19.7 kB

Release files / debuganything-1.0.1.tar.gz

Download URL debuganything-1.0.1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ef6e6724fb374ac124fbf2910f1e3be4d4c80d3c8cf3a26c626da7df432d6f4d
BLAKE2b-256 checksum
How to use checksums
9d946c884cb7deb6e3c8c2f84ef3724a9354901da448a214dacfb8e42c6e0578
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.1-py3-none-any.whl

Download URL debuganything-1.0.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26d6b4d9be39520ce0d566af651fec6e6035822412da597f4f708bfd0aec30a4
BLAKE2b-256 checksum
How to use checksums
49d186e6b7f333e2f5da4de4d59ce044d1529f53ceadbd80c97cce8335c44a5d
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

This release

1.0.1 This release

2 release files

1.0.0

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