Measure before building
I built an AI agent on the homelab to run a weekly coursework report and post it to Notion. It took about six hours. It lasted twenty-four.
The teardown was triggered by one bug. The script that created Notion rows printed "Successfully created row" for rows that did not exist. I lost hours chasing a phantom authentication error before reading the script itself: its success check was if [ $? -eq 0 ] on a curl call. That tests whether curl ran, not whether the API accepted anything.
- symptom
- Tool reports success. Rows don't exist. Hours chasing a 401 that wasn't the problem.
- cause
- Success was inferred from the exit code of the HTTP client, not from the response body.
- fix
- Check the response body, not
curl's exit code, and treat a missing row as a failure instead of printing success. - rule
- Any script that writes to an API checks the response, not the exit code, and anything that reports success gets verified independently. A tool that lies about success is worse than no tool.
The bug was fixable. The larger problem wasn't. The agent needed constant hand-holding, and the actual job, a scheduled report, doesn't need a model at all; the script already produced readable output, and the agent was only formatting it. I'd built the interesting thing instead of the necessary thing, on an assumption about what would help, without measuring first.
The next day I installed a different agentic tool, confirmed it worked, and removed it before spending a single credit. There was no workload yet: no coursework in Notion, no syllabi, no reporter. An agent with nothing to act on is a hobby. It goes back on when there's something for it to do, and that decision now has a trigger written next to it instead of a feeling.