Priya runs a three-person bookkeeping firm. Every Monday morning she opens a spreadsheet of unpaid invoices, checks it against a shared inbox, and sends forty-odd polite reminders by hand. The whole ritual takes her four hours. She has typed the subject line so many times she could do it with her eyes shut.
Her first instinct was to buy software. Her second, better instinct was to build a small AI intelligent agent that handles the Monday job: read the ledger, work out who is overdue, draft a reminder in the right tone, send it, and log what happened. That took an afternoon. It now runs before she is awake.
This is the walkthrough for that kind of project. Not the vendor pitch, not the theory, just the steps that actually matter and a few traps that will otherwise eat your weekend.
Start with the job, not the technology
The single most common failure is beginning with “I want to build an AI agent” and hunting for something to point it at. That produces a demo nobody uses twice.
Flip it. Write the job as one sentence a temp could follow without asking you a single question. Priya’s sentence was:
Every Monday at 8am, find every invoice more than 14 days overdue and email the client a reminder.
Notice what that sentence locks down: the trigger, the data, the condition, the output. If you cannot write that sentence, you are not ready to build. If you find the vocabulary around agents slippery, it is worth reading a plain-English explanation of what the technology actually does before you commit the weekend, because half the marketing out there describes something far grander than the software you are about to make.
Map the loop your agent will run
Almost every useful agent, from a to-do list bot to a trading system, runs a variation of the same four-beat cycle. Sketch it out on paper before you touch a config screen.
Observe
Where does the information come from? A spreadsheet export, a database query, an inbox, an API. Be specific about the format, because messy input is where agents break first. Priya’s ledger exports as CSV with a date column formatted three different ways.
Decide
What rule or judgement turns that input into an action? Some steps are pure logic (balance above zero, due date in the past). Others need a model (writing a reminder that sounds human rather than robotic). Keep them separate so you can debug one without touching the other.
Act
What does it actually change in the world? Sending an email, creating a task, updating a row. Vague actions produce vague agents.
Check
How do you know it worked? A log entry, a status flag, a reply arriving. Without this beat, you have an agent you cannot trust and cannot improve.
Decide how much rope to give it
Autonomy is not a switch. Treat it as a dial and turn it slowly.
- Draft mode. The agent does everything except the final send. You review and approve. This is where every project should start, no exceptions.
- Act with limits. It sends, but only within narrow boundaries: approved recipients, a maximum number of actions per run, a value cap.
- Full autonomy. It runs, retries failures, and escalates only when something odd happens. Earn this. Do not start here because the demo looked impressive.
Priya’s agent spent two weeks in draft mode. She caught four bad drafts in the first three days, mostly to clients who had already promised payment in a phone call.
Give it tools, not just opinions
A language model on its own can only produce text. The moment it can read your ledger and hit an email API, it becomes useful. This is the part people underestimate: connecting tools is where most prototypes quietly die.
Wiring is rarely glamorous. You will spend more time on authentication, rate limits and date formats than on clever prompting. If you want a sense of how broad the tool landscape has become, there is a solid round-up of real-world AI agent examples that shows the same loop running inside logistics, support desks and scheduling tools.
A concrete build: the Monday invoice agent
Here is what Priya wired up, in order.
The trigger
A weekly schedule for Monday, 07:45. Slightly early so the emails land in inboxes at the start of the working day.
The read step
Pull the accounting export, normalise every date to one format, and discard rows with a zero balance or a payment plan flag.
The decision step
Flag anything past 14 days. Drop anything under £25, because chasing small remainders costs goodwill. Then ask the model to write a two-sentence reminder in the client’s language, referencing the invoice number and the amount.
The action and the log
Send through the email provider, then write a row to a tracking sheet with the timestamp, client, amount and status. That sheet is how she reviews a week in ninety seconds.
What went wrong in week one
Two clients had partially paid and received a firm nudge about a £12.40 balance. One replied, politely, pointing this out. The fix was a partial-payment check and the £25 floor. Neither was a technical failure. Both were missing rules that only show up once real data flows through.
Break it on purpose before you trust it
Before you let an agent near anything that matters, feed it the ugly cases. Priya ran ten: a client with two open invoices, a missing email address, a currency mismatch, a duplicate row, an invoice paid the same morning, a name with an apostrophe, a client on holiday hold, a bounced address, an amount of £0.01, and a ledger with a blank date field.
Five failed on the first pass. All five were fixable in under an hour each. That single afternoon of deliberate sabotage saved her from the far worse experience of discovering a bug in front of a paying client. If you want a slower, more thorough version of this process, there is a detailed step-by-step guide to building your own intelligent agent that walks through each stage with worked examples.
Guardrails you should not skip
Four controls cover most of the risk:
- A hard cap on actions per run, so a bug cannot email your entire contact list.
- An allowlist of recipients or records the agent may touch at all.
- A full activity log with timestamps, inputs and outputs, kept for at least a month.
- A one-step kill switch that stops the schedule immediately. Test it once, in advance.
These feel bureaucratic until the first time something goes sideways at 3am, which it will.
Measure the gain, then extend the loop
After six weeks, track the number that matters: hours returned. Priya went from four hours a week to about twenty minutes of review, and overdue payments landed four days faster on average. That is a real return on an afternoon’s work.
The temptation now is to build everything at once. Resist it. Add one adjacent job at a time, and only once the first agent has been boring and reliable for a month. Priya’s second agent handled replies: when a client responded with a question, it drafted an answer, checked the ledger for the exact figure, and queued it for approval. That is the natural pattern, because the reply lands in the same inbox the first agent already touches. When you are ready to chain several of these together, this guide to automating a workflow with intelligent agents covers how to hand tasks between them without creating a tangle.
One last thing worth knowing. Agents are patient in a way people are not. They will happily run the same dull check every Monday for two years without drifting or getting bored, which is exactly the trait that makes them worth the setup. Pick the four hours you resent most, write the sentence, and start in draft mode tomorrow.

