Skip to content
AlanVaneAI & Software

Agents, not chatbots

A chatbot answers. An agent gets it done.

a chatbot

Q: “How much for a website?”

A: “It depends. Get in touch.”

— end of exchange

an agent

An enquiry says the site must launch next week.

  1. reads the thread
  2. checks scope and my schedule
  3. sees the deadline and budget don't match
  4. drafts a reply laying out what is possible
  5. hands me the parts only I should decide

Custom agents in TypeScript and Go. Tested against your real cases before they go live, deployed wherever you want them — including nothing at all leaving your network.

I'm Alan — 20+ years writing software, one person, no one between you and the code.

What makes an agent an agent

An agent is worth the engineering when three things are true. It has tools: real access to your inbox, your database, your APIs. It loops: acts, looks at what came back, and lets that shape the next move. And it decides when it's done, instead of running a fixed number of steps someone wrote down in advance.

That last property is also what makes agents expensive. If you already know every step in advance, you don't need an agent — you need automation, which is cheaper to build and steadier to run. An agent earns its cost only when the next step genuinely depends on what the last one turned up.

modeltool callobservedoneinputloops backwhen finished
Input reaches the model; the model calls a tool; the result comes back and loops into the next decision. It leaves the loop the moment it judges the work is finished. The loop is the whole idea — everything else is engineering around keeping that loop safe.

Four shapes this work takes

In each shape the part that matters isn't the happy path — it's the failure you have to design around.

Enquiry and ticket triage

Everything lands in one inbox, so a deal that dies tonight sits three rows above a password reset. The cost isn't the reading — it's that urgent things wait their turn.

arrivesclassify intent and urgencyroute to the right queuedraft a replyescalate when unsure

The failure I design around

A confident wrong call on an angry customer. So the design rule is: when confidence is low, or the message mentions money, a deadline, or walking away, it hands over instead of guessing. The worst case becomes a human reading one extra message — never a bad reply sent in your name.

Document extraction

Invoices and orders arrive from dozens of suppliers, no two laid out alike, and someone retypes them into the ledger. It is the most common thing people ask how to make stop.

document inextract fieldscheck against what's knownwrite to the systemqueue anything doubtful

The failure I design around

A wrong number that looks right. So extraction is checked against things already known — supplier list, expected totals, whether line items even add up. Anything that doesn't reconcile goes to a review queue, not into your books.

Internal knowledge

The answer exists somewhere — a policy, a contract, an old thread. Finding it takes twenty minutes; interrupting a colleague takes two. So everyone interrupts the colleague.

question askedsearch the document setread the candidatesanswer with citations

The failure I design around

An answer that sounds right and isn't. So every answer cites the paragraph it came from, and the agent is built to say “I can't find it” rather than stitch a plausible one out of fragments.

Research and monitoring

Something outside needs watching — competitor pricing, tender listings, a regulator's page. It matters weekly and it never quite gets done.

scheduled runcheck the sourcesdiff against last timereport only what changed

The failure I design around

Alert fatigue. If it reports everything, it becomes one more feed nobody reads — so most of the design work goes into deciding what counts as a change worth telling you about.

The engineering behind it

This is the part that tells you whether someone has shipped an agent or only demoed one.

Model selection

Most steps in an agent are small — classify this, extract that, is this finished. Small, fast models handle those well, and the latency gap is the gap between instant and waiting. Large models go to the few steps that genuinely need judgement. When data shouldn't leave the building at all, steps move to a local model instead.

Context engineering

An agent that behaves badly is usually not badly prompted — it is badly supplied. It decides while missing a fact it had no way to know, or wades through twenty pages where two paragraphs mattered. Putting the right information in front of it at the right step is most of this work.

Tool design

Tools are the agent's only interface to your business, and a tool's description is an instruction, not documentation. A hand_over tool whose description says when to reach for it gets used correctly far more often than one that only says what it does.

// Tool definitions for a triage agent (illustrative)
const tools = [
  {
    name: "read_enquiry",
    description: "Fetch an enquiry by id, with its full message history.",
  },
  {
    name: "hand_over",
    description:
      "Pass this enquiry to a human. Use this whenever the budget or " +
      "deadline is unclear, or the customer sounds upset — not only " +
      "when you are unsure what to say.",
  },
];
Note that hand_over's description says when to reach for it. That sentence does more work than any system prompt.

Evals before it ships

An agent that works on the three examples you tried by hand is not an agent that works. Before go-live it runs against fixtures built from your real cases — including the awkward ones — and the tests assert on the actions taken, not on the wording of the output.

// Behaviour, not prose (illustrative)
test("hands over instead of replying when the deadline is impossible", async () => {
  const run = await agentRun(fixture("impossible-deadline.json"));

  expect(run.actions).toContainEqual(
    expect.objectContaining({ tool: "hand_over" }),
  );
  expect(run.actions).not.toContainEqual(
    expect.objectContaining({ tool: "send_reply" }),
  );
});
Assert on behaviour: it handed over, and it didn't reply on its own. Testing the model's wording would break every time the model changes.

Guardrails and human-in-the-loop

Every build gets an explicit answer to “what happens when it's wrong?” — confidence thresholds with a review queue behind them, hard limits on what any tool may do without sign-off, and a list of irreversible actions that always require a person. An agent that quietly does the wrong thing is far worse than one that stops to ask.

Observability

Every run leaves a full decision trail — which tools were called, in what order, what came back — plus usage numbers, so operating cost is something you see rather than guess from an invoice. When it does something surprising in month four, that trail is the difference between a fix and a rewrite.

What it costs to run

Agents are billed by usage, so running cost scales with volume instead of sitting on your books as a fixed licence. For typical workloads that number is small next to the work being replaced — but I won't publish a figure that pretends your volumes are everyone's. What I do give you is the real number for your case before you commit, and once it's live the usage trail means you see it rather than infer it. Where cost matters, the lever is almost always model selection, not volume.

How a project runs

A single agent is typically two to four weeks from first call to something running. Larger builds get staged, with working software at the end of every stage.

01a few days

Discovery

What the agent is actually for, what it needs access to, and whether it should be an agent at all. If a simpler automation would do, that's the answer you get.

02about a week

Prototype

An agent running on your real data, narrow but end to end. Deliberately early: it is far cheaper to learn the idea needs changing now than after the full build.

031–2 weeks

Evals and hardening

Fixtures from your awkward cases, tests asserting behaviour, confidence thresholds, the escalation path, and the logging you'll want later.

04ongoing as needed

Production and handover

Deployed where you want it, code in your repository, documented, with a walkthrough so your team can maintain it without me.

The stack

TypeScriptReactNext.jsGoNode.jsPostgreSQLCloudflare WorkersDockerOpenCodeClaudeOpenAILocal LLMs

Frequently asked questions

What if it gets something wrong?

Then a person sees it. Confidence thresholds, review queues, and hard limits on irreversible actions come standard; the failure mode in every design is “a human reads one more thing”, never “an automated action went out wrong”.

Which model does it use?

Whichever each step needs. Routine steps on small, fast models; judgement calls on frontier ones; local models where data can't leave. Model choice is per step and can change later without rebuilding the agent.

Can it run entirely on our own infrastructure?

Yes. It can run on your Cloudflare account, your servers, or local hardware — same code either way. Self-hosted also means no platform bill stacking up behind you.

What does it cost to run?

Billed by usage, so it scales with your volume. I estimate it for your real numbers before you commit, and the usage trail keeps it visible after launch.

How do we maintain it after handover?

The code is yours, in your repository, documented. The eval set ships with it, so when something changes you can verify before you deploy. Support is available but never a condition.

Got a workflow in mind?

Tell me what it is and I'll tell you whether an agent is the right tool for it. If it isn't, I'll say what I'd use instead.

Start a project →