How to build an AI agent that does real work
An agent is a loop with tools and a stopping condition, and almost every failed build gets the stopping condition wrong rather than the model. Give it a small number of sharp tools, a clear definition of done, and a human review gate on anything irreversible. The interesting engineering is in the boundaries, not the prompt.
Start from the task, not the framework
Write the exact sequence a person would follow. If you cannot write it down, the agent cannot follow it either, and no framework fixes that.
Few tools, sharply defined
Every extra tool multiplies the ways a run can go sideways. Three tools that do one thing each beat twelve that overlap.
Make irreversible actions ask first
Sending, publishing, deleting, spending. A gate on these is what makes an agent safe to leave running, and it costs almost nothing to add.
Log every run and read the failures
Agents fail in ways you did not predict. Without a transcript you are guessing, and guessing is how a broken loop survives for weeks.
Written from running an autonomous system that manages Kevin's own funnels, jobs and publishing, with the review gates that keep it from doing anything irreversible unasked.