DEV Community

Cover image for A cheap AI agent fixed 7 bugs for $0.01 — and did 9 more dev tasks. Total: $2.00
BrainWave Studio
BrainWave Studio

Posted on Edited on

A cheap AI agent fixed 7 bugs for $0.01 — and did 9 more dev tasks. Total: $2.00

We gave an AI agent ten tasks in plain English — a code review with fixes, a Telegram bot with tests, a data report from a CSV, a few web apps — and ran all of them on one inexpensive model. We didn't write or edit a line of code. Ten tasks took 52 minutes of model time and $2.00 in total.

Task 1: fix someone else's code

A folder with a small Python to-do app written by someone else, plus its tests. Most tests failed. The prompt:

Act as a careful senior developer — find all the bugs, including the ones the tests don't catch, fix them and write a report.

The agent ran pytest, read the code, found 7 bugs, fixed them without touching the tests and wrote a report:

Fixing someone else's code
The agent's report: 6 failed / 1 passed before, all 7 passed after — $0.01

One of the bugs is the classic that tests rarely catch:

- def __init__(self, tasks=[]):
-     self.tasks = tasks
+ def __init__(self, tasks=None):
+     self.tasks = list(tasks) if tasks is not None else []
Enter fullscreen mode Exit fullscreen mode

Every TodoList() shared the same list — add a task to one, and it shows up in all of them. Another bug swapped day and month in a date format. Before: 6 failed, 1 passed. After: all 7 passed. One run, one minute, $0.01.

The setup

  • one model for everything — Claude Haiku 5.5, one of the least expensive in its family;
  • the agent can create files, run one program at a time (Python, Node, test runners), open a page in a clean browser window, take a screenshot and read the console errors;
  • we only looked at results and, when needed, asked for changes;
  • the price is the OpenRouter bill for all runs, fixes included.

The agent runs in Valaris, a desktop app (and web version) we build at BrainWave Studio: hundreds of models from OpenRouter in one chat, chats stored only on your machine.

All ten tasks

Task Time Cost Runs
Fixing someone else's code 1 min $0.01 1
Telegram bot with a shop inside Telegram 5 min $0.10 2
Sales report from a spreadsheet 2 min $0.07 1
Crypto dashboard for Bybit 4 min $0.07 2
Online store 4 min $0.07 1
Coffee shop website in 5 languages 7 min $0.10 2
Habit tracker app 3 min $0.05 1
Solar System quiz for kids 2 min $0.03 2
Picture book “Pip and the Lost Star” 9 min $0.19 4
Browser game “Gale the Hedgehog” 15 min $1.31 5
Total 52 min $2.00

"Time" is from sending the task to the finished result; "runs" is how many times we sent the task or asked for a change.

Task 2: a Telegram bot — with 34 tests nobody asked for

Telegram bot with a shop inside Telegram
A flower shop as a Telegram Mini App: catalog, cart, promo code, checkout — $0.10

The bot plus a Mini App shop inside Telegram: catalog, cart, promo code, checkout, colors from the Telegram theme. Unprompted, the agent wrote 34 tests for the bot, and all of them pass. Five minutes, two runs, $0.10.

Task 3: a sales report from a CSV

Sales report from a spreadsheet
848 orders → a Python script → a dashboard with charts and conclusions — $0.07

A CSV with 848 orders for a year. The agent wrote a Python script that computed revenue, average order value, top products and regions and the monthly trend, then turned the numbers into a dashboard with charts and plain-language conclusions. Two minutes, $0.07.

What we learned

  • Running code beats reading code. The cheap model got the review right because it could run the tests, not because it "understood" everything on the first read.
  • Screenshots catch what tests don't. For the web apps, opening the page in a clean browser window and looking at it fixed layout problems no test would flag.
  • Cost follows back-and-forth, not difficulty. One-shot tasks cost cents. The browser game was the most expensive ($1.31) because we built it in five small steps.
  • Sandboxing is the real feature. The agent only sees folders you picked; every file write asks first and shows a diff; any change can be undone; there is no delete; it runs one program at a time, never a shell, with a time limit and without your environment's keys and tokens.

The other seven

Crypto dashboard for Bybit
Crypto dashboard (read-only key via a local proxy, demo data) — $0.07

Online store
Online store: 16 products, filters, cart, 3-step checkout — $0.07

Coffee shop website in 5 languages
A coffee shop site in 5 languages — $0.10

Browser game “Gale the Hedgehog”
Browser game — the most expensive, $1.31, built in 5 steps

What it doesn't replace

  • These are small, self-contained projects. Real codebases have more connected parts and need more review.
  • A human still decides when it's done.
  • All companies, people and data in the projects are made up — it's a demo, not client work.

Try it

Valaris is free; agent mode is part of Valaris Pro, and models are paid at their OpenRouter price. What would you hand to a cheap model? Drop a task in the comments — we'll run the interesting ones and post the results.

— BrainWave Studio, the team behind Valaris

Top comments (0)