← Back to work

AutoDev.Py

Local, self-correcting Python coding agent — plans, writes, and runs code in a Docker sandbox, retrying on the real traceback.

Category
Python
Stack
Python, CrewAI, Ollama, Docker, Streamlit
Code
GitHub ↗
Live
AutoDev.Py

Overview

AutoDev.py is a local, self-correcting Python coding agent. It takes a natural-language task, plans the implementation, writes a script, executes it in a constrained Docker sandbox, and retries with the exact traceback when the code fails. It's local-first — Ollama for inference, Streamlit for the UI, Docker for isolation — and the real engineering goal isn't code generation, it's an observable feedback loop around untrusted generated code.

Agent flow

An Architect → Coder → QA pipeline driven by an explicit orchestrator state machine (IDLE → PLANNING → CODING → EXECUTING → SUCCEEDED / RETRYING / FAILED). Agents return their output to the orchestrator rather than calling each other, keeping retries, cancellation, and persistence inspectable through JSONL transition logs.

Sandboxed execution

A Docker-backed SandboxedPythonExecutor with no host fallback runs every generated script; fail-closed sandbox checks, bounded retries, and a repeated-traceback circuit breaker stop runaway loops.

Reproducible sessions

Each run writes task.txt, plan.md, numbered attempt files, a final.py (only after a passing execution), and a timestamped execution_log.jsonl under the session directory.

Tooling

A Streamlit dashboard and a pr-agent CLI drive runs; CI covers Ruff, unit tests, package build, Docker builds, and adversarial sandbox tests.

Built with

  • Python
  • CrewAI
  • Ollama
  • Docker
  • Streamlit