Agent 01 · Voice agent and missed-call text-back
Answering the phone
Every call you cannot answer gets picked up. If it is not you, it is an agent that takes the name, the number and the job, and texts them back inside a minute.
Most of the work a small firm loses, it loses at the phone. Not to a better quote. To whoever picked up second.
You are on a roof, under a sink, or driving. The phone rings out. The caller has three more numbers on the same search page and no particular reason to prefer yours. By the time you hear the voicemail — if they left one, and most do not — the job belongs to somebody else.
This is the agent that stops that. It rings your mobile first, because if you can answer, you should. If you cannot, it answers, takes the details in a plain voice, and writes them down where you will see them. The caller has a text from you before they have dialled the next number.
What happens, in order
-
01
The call comes in
It rings your mobile for twenty seconds, exactly as it does now. If you pick up, the agent never runs and you never hear from it. Nothing about your day changes on the calls you can take.
-
02
The agent answers
It gives the firm's name and asks three things: what the job is, where it is, and when they need it. It does not pretend to be a person, and it does not quote. Quoting is yours.
-
03
The details get written down
Name, number, postcode, job, urgency. One row on the job sheet, one line in your inbox, one text to your phone. The same five facts in all three, so there is nothing to reconcile later.
-
04
The caller gets a text
Inside a minute, in your name. We missed you, here is what we do, reply here and we will ring back. Most people answer that text rather than carry on down the list.
-
05
You ring back knowing something
You are not returning a blank missed call. You know the job, the address and whether it can wait until Thursday.
-
06
Nothing gets quietly lost
A sweep runs every five minutes and picks up anything the telephony provider failed to hand over. A call that neither of you answered appears on the sheet as a miss, rather than not appearing at all.
What it is built from
Named parts, not a black box.
-
Docker
One compose file per client, version-controlled. Everything below runs inside it.
-
n8n, self-hosted
The drawing above, as nodes you can watch run. You get a login on day one.
-
Python 3.12
The workers: the five-minute sweep, the tidy-up of what the agent heard, and the writes to the sheet.
-
cron
Two schedules on this workflow. The sweep, and the Monday morning summary.
-
Telephony
Twilio, or your existing provider if it has an API worth the name. The number, the twenty-second fork to your mobile, and the text-back all sit here.
-
A voice model
Answers, listens, asks its three questions, stops. Not a chatbot with a phone line attached.
-
Google Sheets
The job sheet. Anything a person needs to read during the working day lives here, because everyone can already read a spreadsheet.
-
The warehouse
Still to be chosen — product name to be confirmed. Every call, every miss, every callback, kept with its history so the monthly figures are countable rather than remembered.
How it is built, in order
From a bare machine to a live agent.
First line to last. Someone competent could follow this. That is the point of printing it.
-
01
The box it runs in
Docker on the host. That host is a spare PC in the office, a NUC on a shelf, or a VPS at about five pounds a month — whichever you already have. One
docker-compose.ymlper client, kept in version control, brought up withdocker compose up -d. If the machine dies, the same file on a new machine puts everything back. -
02
Inside the container
Python 3.12, and only the libraries this workflow actually needs:
requestsfor the telephony API,gspreadfor the job sheet, andpython-dateutilfor the working-hours logic.crongoes in the same image for anything that runs on a clock rather than on a trigger. -
03
The cron jobs
This workflow needs two.
*/5 * * * *sweeps for calls the webhook did not deliver, because telephony webhooks fail quietly and a silent failure here is a lost job.0 7 * * 1sends the Monday morning summary: calls taken, calls missed, callbacks made. The full list we run on an agent, and what breaks when each one is missing, is written up in the cron jobs worth setting up for an agent. -
04
n8n
Self-hosted, in the same compose file. This is where the drawing above stops being a drawing: every box is a node, and every arrow is a connection you can click. You get a login and can watch a call move through it in real time. We would rather you looked than took our word for it.
-
05
Credentials and accounts
Every account is opened in your name, on your card, with us added as a partner. Not ours with you as a guest. If you want us gone, you remove us in one click and everything keeps running. That is the arrangement, and it is a selling point rather than a footnote.
-
06
The data layer
Google Sheets for the job sheet, because a person has to read it between jobs. The warehouse — to be confirmed — for anything with history: every call, every miss, every callback, every recording reference. Sheets is for today. The warehouse is for the question you will ask in March about last October.
-
07
Wiring the phone in
In this order, because each step needs the one before it. The number first, ported or new. Then the fork to your mobile with the twenty-second timeout. Then the voice agent on the far side of that timeout. Then the text-back on the same number, so the message comes from the number they rang. Then the write to the sheet. Then the alert to you. Testing the text-back before the number is live tests nothing.
-
08
Testing on real calls before hand-over
We ring it ourselves from four or five different phones, including one with a bad line, and we get somebody who is not us to ring it too. It has to answer in under six rings, get the postcode right, write one row rather than two, and text back inside sixty seconds. It has to do all of that on ten consecutive calls. Until it does, it is not finished and we do not invoice.
See it working
-
Recording of a real call
A thirty-second clip of the agent taking a job, with the client's permission and the caller's.
-
The job sheet
A screenshot of a real week, with names removed.
-
The text as the caller sees it
A photograph of the phone, not a mock-up.
What this one costs
You get that number before anything starts, not after. If it is not the number you were expecting, say so then — it is a much cheaper conversation than the one at the end.