Yes, but a smaller agent than the name suggests. Ordinary code builds the days and checks every number in them. An agent sits in front of that code: it reads what each person in the family asks for, looks things up, and tells each of them what happened to their wish. Choosing between wishes stays with the family. I got there by putting six ways of planning this trip side by side. Then I sorted the eighteen things a fortnight’s plan has to get right by which of code, a model or a person is good at each. Eleven of them are sums and lookups. A mistake in one of those leaves a car dry on the highway, or still driving after dark.
Six ways to plan a fortnight
The paper map on the kitchen table. No software at all: the family round the road atlas with a pencil. It gets the conversation right. Everyone hears everyone, the arguments happen in the room, and I can see who’s gone quiet. The sums get done once, on the back of an envelope, and nobody does them again when a night moves. Nothing records who asked for what, either, so when somebody says “we always do what she wants”, there’s nothing to check it against.
A spreadsheet. A row per day, with columns for departure time, each leg’s distance, kilometres since the last fill, and sunset. The sums are on show and redo themselves on every edit, there’s nothing to install, and there’s no bill. The distances and sunsets are typed in by hand, though. Moving one night means retyping the legs either side of it and the sunset for every day after it. Closures never reach it. The wishes sit in a free-text column that no formula reads. This is the baseline. Whatever we build has to do what the spreadsheet can’t: fetch its own distances, rework every day after a moved night, hear about a closed road, read that column of wishes, and remember who asked for each of them.
A plain program. A routing service supplies distances and driving times, and ordinary code does the rest, with a constraint solver for the hard part. A constraint solver is a program that takes a set of rules and either finds a plan that satisfies all of them or reports that no plan does. A good one can also say which rules are in conflict. Every sum on this trip is a rule it can hold: no day longer than anyone will sit through, no stretch between fills longer than the tank, every booked night honoured, every day finished before sunset, the footprints at low tide. It’s the same family of search that finds the route in a map app. Its checks give the same answer every run, and running them again costs nothing anyone would count. It can be tested. When it can name the rule that failed, the reason is short enough for a child: “that day’s too long.”
What it can’t do is take the family’s wishes. “Fishing off the beach” and “the shortest days in the car” aren’t rules until somebody turns them into rules. Neither is “the real prints, not the casts”. The casts are replicas set into the rocks by the walkway at Gantheaume Point, and the real footprints can be reached on foot only at low tide. Two wishes that collide have no numeric answer at all. Getting what people want out of their heads and into rules is where logic-based systems have always struggled. With a plain program, the person turning wishes into rules is me, the same as at the kitchen table.
A chat model with no tools. Paste in everyone’s wishes and ask an LLMA neural network trained to predict the next token in a sequence, large enough that it generalises to tasks it wasn’t explicitly trained for. for a fortnight. It reads the wishes well, notices that a pool every afternoon fights the shortest days in the car, and writes a kind explanation for whoever loses. None of the numbers in its answer was looked up. It has no source for the distance from Sandfire to Roebuck Plains, which roadhouses are open, or when the tide is low at Gantheaume Point, and it can give confident figures for all three. Its plan can only be checked by hand. Redoing it after a change means asking again from the start, and that can get a different fortnight. A route and a fuel plan match two of the clearest signs that an LLM is the wrong tool: picking a route is a search through possible plans, and a fuel plan needs an answer that’s right rather than plausible.
An agent with tools. An LLM in a loop, calling a routing service, a places search, the state’s closures and the family’s bookings, and picking which to call next from what came back. It handles the wishes, the several people and the fetching all in one place. Every number now comes from a tool, but on its way into the plan it passes through the model, which can change it or drop it. The same request can take a different path the next time. Each step is a model call with money and seconds attached, and the loop makes both hard to predict. When somebody asks why day four looks the way it does, the answer is in a trace, the record of every call the agent made. Reading one is nobody’s idea of a holiday. Most of what it would loop over has steps anyone could write down in advance. Adding up a day’s legs is the same job every time, and when every step is known, a loop only adds model calls.
The hybrid. Ordinary code owns the sums and reports what can’t be met. A model owns the parts code is bad at: reading several people’s wishes in their own words, noticing that two of them collide, asking the question nobody thought to ask, and explaining a trade-off to the person who lost it. Where the order of the steps is known in advance, code runs the sequence and the model is one step in it. That’s two halves to build and maintain, and the model’s words can still misdescribe a plan the code got right.
Eighteen jobs in three piles
Every candidate fails somewhere, so the useful question is where each job belongs. Each of the eighteen falls into one of three piles.
| Pile | What the plan has to get right | Jobs |
|---|---|---|
| Sums and lookups | the distance and driving time of every leg; hours in the car each day; every stretch between fills inside the tank; a break at least every two hours; arriving before sunset; each booked night in the right town on the right dates; the footprints at a daylight low tide; roads the state has closed; places open when we get there; stops in route order with no doubling back; the days laid out from the stops already chosen | 11 |
| Language | reading each wish in its owner’s words; asking when a wish could mean two things; noticing when two wishes collide; telling whoever lost why, in words they’ll accept at dinner | 4 |
| Judgement | which wish gives way when two collide; whether a long day is worth what’s at the end of it; whether the fortnight is fair to everyone | 3 |
The first pile is most of the trip and nearly all of the danger. Get one of those sums wrong and the car runs dry short of Roebuck Plains, or we’re still on the highway when cattle wander onto it. Main Roads WA tells drivers to watch for animals “especially dusk till dawn, when the risk of hitting livestock is the highest”, and to drive during daylight hours where possible. That pile belongs to code, which gives the same answer every time it runs.
The second pile is language, which an LLM does well and code does badly. The third belongs to neither. Choosing which wish gives way is a parent’s job, at the table, as it is now. What software can do for that pile is lay out the options with the numbers already worked. From its record of who asked for what, it can show how the finished fortnight serves each person, wish by wish. Once a choice is made, it can put it into words. Whether the result is fair is still the family’s call.
Where the line goes
The answer is the hybrid, with the line between code and model drawn round the piles: code owns the sums and lookups, an AgentA system that wraps an LLM with tools, memory, and a loop, so it can take multi-step actions toward a goal rather than just answering one prompt. owns the language, and the family keeps the judgement.
The model’s half needs a loop because no two wishes take the same steps. “Somewhere with a pool” means finding out where we’re sleeping each night, searching for pools near those towns and then, depending on what turns up, either asking whether a caravan park’s pool counts or asking the planning code whether swapping a night still passes. “The real prints, not the casts” needs the tide table instead. Next month somebody will want something none of us has thought of yet, and nobody can write down that wish’s steps before it arrives, which makes it the kind of job an agent suits.
Planning the days isn’t that kind of job. Once the stops and the booked nights are chosen, building the days and checking them runs the same steps every time. That’s code, and the agent calls it as one of its Tool useLetting an LLM call structured functions you’ve defined – search, calculator, database query, API call – instead of trying to do everything in text.. The model never supplies a number. It proposes stops and writes words, and the code works out every distance, time and fill from the route. A figure garbled on its way through the model has nowhere to land. The loop runs only when somebody asks for something: a few wishes, on a few evenings. Between those, the checks are code, and code can run as often as anyone likes.
The model’s half keeps one weakness of the agent with tools: it isn’t guaranteed to repeat, so the same wish on Wednesday can come back as a different proposal. And its words can still get the plan wrong, telling somebody lunch is at Pardoo when the plan has it at Sandfire. No check of sums will catch a sentence.
If the sort had come out with no language pile to speak of, we’d be building a plain program and calling it an agent. The second pile is real, though. A family typing wishes on different evenings, in their own words, is the problem I started with.
The line, drawn on one day
Say a plan has us driving Port Hedland to Broome on Tuesday 6 July 2027, in the school holidays. That’s 150 km to Pardoo, 140 more to Sandfire, 285 to Roebuck Plains and 35 into Broome, and the sun sets in Broome at 17:28. The distances are routed along the highway on OpenStreetMap data (© OpenStreetMap contributors) and rounded to 5 km, and the sunset comes from the US Naval Observatory’s tables. Say, too, that the car’s one we’d trust for 400 km between fills.
This check, saved as check_day.py, tests two of the eleven sums for that day: fuel and daylight. It guesses an average of 90 km/h, where the real planner takes driving times from a routing service.
from datetime import datetime, timedelta
# Facts the check reads from here, never from the plan it is checking.
SELLS_FUEL = {"Port Hedland", "Pardoo", "Sandfire", "Roebuck Plains", "Broome"}
TANK_KM = 400 # how far we trust the car between fills
AVERAGE_KMH = 90 # this check's own guess; real times come from routing
def check_day(depart, stops, sunset):
"""Each stop is (place, km from the last stop, minutes stopped, fill up?).
Returns a list of problems in words. An empty list means the day passes.
"""
problems = []
clock = datetime.strptime(depart, "%H:%M")
since_fill, last_fill = 0, stops[0][0]
for place, km, minutes, fill in stops:
since_fill += km
clock += timedelta(hours=km / AVERAGE_KMH)
if fill and place not in SELLS_FUEL:
problems.append(f"fuel: {place} has no fuel to sell")
# A stretch ends where we next fill, or where the day ends.
if (fill or place == stops[-1][0]) and since_fill > TANK_KM:
problems.append(f"fuel: {last_fill} to {place} is {since_fill} km, "
f"and the tank is good for {TANK_KM}")
if fill and place in SELLS_FUEL:
since_fill, last_fill = 0, place
clock += timedelta(minutes=minutes)
# The loop added the time spent at the last stop; we arrived before it.
arrive = clock - timedelta(minutes=stops[-1][2])
dark = datetime.strptime(sunset, "%H:%M")
if arrive > dark:
problems.append(f"daylight: we reach {stops[-1][0]} at "
f"{arrive:%H:%M} and the sun sets at {sunset}")
return problems
The list of places that sell fuel lives in the check, not in the plan. A plan that claims a fill where there’s no fuel gets that back as a problem. A second file, drafts.py, saved next to it, puts two drafts of the day through the check. The first leaves at ten after a slow breakfast, stops at Sandfire for lunch without filling up, and fills at Roebuck Plains instead. The second leaves at half past eight and fills at Sandfire.
from check_day import check_day
SUNSET_BROOME = "17:28" # Tuesday 6 July 2027, US Naval Observatory
# Distances along the highway, rounded to 5 km.
first_draft = [
("Port Hedland", 0, 0, True),
("Pardoo", 150, 15, True),
("Sandfire", 140, 45, False), # lunch, but no fill
("Roebuck Plains", 285, 10, True),
("Broome", 35, 0, False),
]
second_draft = [
("Port Hedland", 0, 0, True),
("Pardoo", 150, 15, False),
("Sandfire", 140, 45, True), # lunch, and fill up
("Roebuck Plains", 285, 0, False),
("Broome", 35, 0, False),
]
for name, depart, stops in [("First draft", "10:00", first_draft),
("Second draft", "08:30", second_draft)]:
print(f"{name}, leaving Port Hedland at {depart}")
for problem in check_day(depart, stops, SUNSET_BROOME) or ["passes"]:
print(" " + problem)
Running python3 drafts.py with Python 3.13 printed this:
First draft, leaving Port Hedland at 10:00
fuel: Pardoo to Roebuck Plains is 425 km, and the tank is good for 400
daylight: we reach Broome at 17:56 and the sun sets at 17:28
Second draft, leaving Port Hedland at 08:30
passes
The tests, five of them, all passing
These go in test_check_day.py, beside the other two files.
import unittest
from check_day import check_day
SUNSET = "17:28"
def day(sandfire_fill, roebuck_fill):
return [
("Port Hedland", 0, 0, True),
("Pardoo", 150, 15, True),
("Sandfire", 140, 45, sandfire_fill),
("Roebuck Plains", 285, 10, roebuck_fill),
("Broome", 35, 0, False),
]
class CheckDayTest(unittest.TestCase):
def test_skipping_sandfire_runs_the_tank_dry(self):
problems = check_day("07:00", day(False, True), SUNSET)
self.assertEqual(problems, [
"fuel: Pardoo to Roebuck Plains is 425 km, and the tank is good for 400"])
def test_filling_at_sandfire_passes(self):
self.assertEqual(check_day("07:00", day(True, False), SUNSET), [])
def test_late_start_arrives_after_sunset(self):
problems = check_day("10:00", day(True, False), SUNSET)
self.assertEqual(len(problems), 1)
self.assertTrue(problems[0].startswith("daylight: we reach Broome at 17:"))
def test_a_fill_where_no_fuel_is_sold_does_not_count(self):
stops = [
("Port Hedland", 0, 0, True),
("Somewhere", 300, 0, True), # the plan claims a fill here
("Broome", 310, 0, False),
]
problems = check_day("06:00", stops, "23:00")
self.assertEqual(problems, [
"fuel: Somewhere has no fuel to sell",
"fuel: Port Hedland to Broome is 610 km, and the tank is good for 400",
])
def test_exactly_a_full_tank_is_allowed(self):
stops = [("Port Hedland", 0, 0, True), ("Sandfire", 400, 0, False)]
self.assertEqual(check_day("06:00", stops, "23:00"), [])
if __name__ == "__main__":
unittest.main()
python3 -m unittest -v test_check_day reported Ran 5 tests and OK.
Finding both problems in the first draft took no model, and no model would have found them more reliably. The model’s half starts where the output stops. “Fuel: Pardoo to Roebuck Plains is 425 km” is true and useless at dinner. “We’re leaving at half past eight, and lunch is at Sandfire because that’s where we fill up” is the same fact said to people. The check passes the second draft, but it checks only two sums. The second draft still runs from Sandfire to Broome, about three and a half hours at the check’s 90 km/h, without a break, and catching that is a third check’s job.
What this commits the build to
Every rule in the first pile becomes code like that check, run and tested with no model anywhere near it. A plan reaches the family only once it passes every check, and the agent’s words go on top of a plan the code has already built and checked. Switch the model off and a parent can still type the stops in and get a checked plan back, which is the spreadsheet with every gap closed but the wishes. The third pile stays at the kitchen table.
That leaves the first pile to be written down properly: every rule a good plan has to pass, with the reason for each, on the right side of this line.