Ramblings of an aging IT geek
← Ramblings of an aging IT geek
ai

the smallest agent loop that earned its keep

A minimal LLM agent that reads my inbox and drafts triage replies, and why the loop matters more than the model.

A small robot arm on a desk

Most "AI agent" demos are a model talking to itself in a loop until it convinces you something happened. I wanted one that actually touched the world, so I built the smallest possible version: it reads my support inbox, decides which messages are routine, and drafts replies for me to approve.

The model is almost the boring part. The interesting part is the loop. The agent gets a list of tools, calls one, sees the result, and decides what to do next. That's it. No clever orchestration, no graph of forty nodes. A while loop, a function that turns a tool call into an actual API request, and the results fed back in as the next message.

What made it useful rather than a toy was constraining it. Two tools, search_inbox and draft_reply, and nothing that could send or delete. It can propose, it cannot act. So when it confidently drafts a reply to the wrong person, and it has, the cost is me reading it and hitting delete rather than a customer getting nonsense.

It now clears the easy third of my inbox before I've finished my coffee. The other two thirds need a human, and that's fine. The win wasn't intelligence. It was giving a modest model a tight loop and a short leash.