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@1.1.0`
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 debuganything_tools
from langgraph.prebuilt import create_react_agent

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

LlamaIndex

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

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

CrewAI

from debuganything.crewai import debuganything_tools
from crewai import Agent

sre = Agent(role="SRE", goal="Diagnose the hung worker with evidence, never guess", tools=debuganything_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@1.1.0", "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. Debug Anything is a free, non-commercial passion project by an independent developer. 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.1.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.1.0
File Size Uploaded Provenance Actions
debuganything-1.1.0.tar.gz 8.8 kB Without provenance Details for debuganything-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 19.8 kB

Release files / debuganything-1.1.0.tar.gz

Download URL debuganything-1.1.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
58b884723634b0f54db3fb36efdc60b025ea9fc7cb861033a4af93e5b96068d7
BLAKE2b-256 checksum
How to use checksums
e8a4860f14a0932dea738abc0233637ffabd069f7cbc49b2e6708c5b1689e75e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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

Download URL debuganything-1.1.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68ed54267d5862c9c37930f0a6efbc3c88585a8e8b5c9e755db3de7da00fda82
BLAKE2b-256 checksum
How to use checksums
5d1ed496b967a5ab661c9fbfa7d2a20cc46c15d2a4bf9c72df055e7e54934a64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for debuganything 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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