Autonomous Code Repair Agent with Test Feedback

Coding assistants now work as agents: they read the code, run the tests, edit and try again. This project builds such an agent around a small code model that runs locally through Ollama (qwen2.5-coder:1.5b, about 1.5 billion parameters, no cloud, on a laptop with RTX 2050 4 GB). For a buggy Python function the agent reads the program, runs its unit tests in a sandbox (temporary copy, separate process, no network, time limit), writes a patch, re-runs the tests and - with Reflexion - writes a note on why a failed attempt failed before it tries again. It is measured honestly on the public QuixBugs and HumanEvalFix benchmarks against a classical mutation-search repair (no language model), a single-shot fix by the same model, ablations and two agent frameworks (smolagents, Claude Agent SDK). Every step is traced (JSONL, five databases, Arize Phoenix) and shown in a web application with a trace viewer; a patch can only be downloaded after a human approved it.

Category: Department of Computer Science and Engineering / Agent Development

Agent Development Project AG01 from ProTechSC Academy, with graphical abstract, video demonstration and project guidance.