Skip to main content

AI-powered Python debugger — run a broken script, get root cause, explanation, and fix

Project description

Debug_agent

AI-powered Python debugger. Run a broken script, get a structured diagnosis with root cause, explanation, and proposed fix.

Install

pip install debugagent

Setup

Create a .env file in your project folder:

GROQ_API_KEY=your_groq_api_key_here

Get a free API key at console.groq.com.

Usage

debugagent run brokenscript.py

That's it. It will:

  1. Run your script and capture the error
  2. Read the source code around the error
  3. Check requirements.txt and git diff
  4. Send everything to an LLM and return a structured diagnosis

Example

$ debugagent run brokenscript.py

Running: brokenscript.py

Script failed (exit 1)

╭─────────────── Traceback ───────────────╮
│ Traceback (most recent call last):      │
│   File "brokenscript.py", line 1        │
│     import nonexistent_module           │
│ ModuleNotFoundError: ...                │
╰─────────────────────────────────────────╯

Analyzing with LLM...

╭─────────────── Root Cause ──────────────╮
│ The module does not exist               │
╰─────────────────────────────────────────╯
╭─────────────── Explanation ─────────────╮
│ The import statement references a       │
│ module that is not installed...         │
╰─────────────────────────────────────────╯
╭─────────────── Proposed Fix ────────────╮
│ Install the module or remove the import │
╰─────────────────────────────────────────╯

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbgagent-0.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbgagent-0.1.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file dbgagent-0.1.1.tar.gz.

File metadata

  • Download URL: dbgagent-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbgagent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0b14b3e8ea6f743d2d9007331c051bf828b0edb0a2efe6626e1cad04c32e0620
MD5 0c06c608ccb05ae596b5eb047f120eb3
BLAKE2b-256 a3437ed9fdf0be8897892092ed3ab93b9c66e0c4fa7b0e285876d6f3dd76de6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbgagent-0.1.1.tar.gz:

Publisher: publish.yml on aryantyagi2211/Debug_agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbgagent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dbgagent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbgagent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1752292381110d3115bc96e9cd31c5337b7b37ea39198023b82802bfe899ef51
MD5 9948d26aac12ab30b92b246303d3df9d
BLAKE2b-256 345551e3d95e9c80a04aa3a5b509748542e3e9773671a0daa9beab55fb8b0dee

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbgagent-0.1.1-py3-none-any.whl:

Publisher: publish.yml on aryantyagi2211/Debug_agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page