What would it take to build a live train map with agents, and how bad would it be?
December 2026 · Tomasz Borys
AI-generated narration.
What would it take for me to build a live train map with agents? And how bad would it be? That was the experiment. I wanted to see how far coding agents could get with little supervision, how accurate my current workflows and tools really were and how hands on I would need to be. Wherever it went badly would show me something to improve.
The idea was simple. A link I could share with friends and family when I'm on the train, showing where my train is, with no app to install and no account. I also had ideas the official National Rail map doesn't usually offer, and I was curious how live rail data would behave on a map.
I also wanted it to be much faster than the National Rail experience, without a lot of selecting times upfront and with data that flows quickly on any connection.
The result is a live map of passenger trains across Great Britain. You can search a station or a journey, open a train to see its calling points and expected times and share where you are with a link that expires. It's still a work in progress, and I'll say where it falls short.
It took about four days, from a Sunday afternoon to Thursday evening, with about an hour a day of my own time. The agents did the rest, sometimes overnight. Not everything was fully tested.

Every test was green
The first real surprise came when I started using the app on my phone.
A journey search into a London terminus found nothing. The search had matched a station with the same name up north first.
The share link had a similar problem. Say you're on a train from Sevenoaks and share it with "I get off at London Bridge". The person who receives the link should see your journey end at London Bridge. They didn't.
Every test was green. I found both problems by using the app the way someone else would.
My first thought was simply that something wasn't right. Then I changed how I worked with the agents. I asked one what was missing in its understanding of what we were building, and to look for other gaps on its own before I started testing.
Product owner, architect and orchestrator
I wasn't only the product owner. I shaped the architecture and orchestrated the agents that built it, without implementing every detail myself.
One coordinator agent held the plan and handed each piece of work to a separate agent in its own git worktree, with a written brief. It reviewed and merged what came back. I set the rules the agents worked by and approved the steps that mattered: going live, database changes and preparing the repo to go public.
The rules were simple. One coordinator. Small briefs. A failing test before every bug fix. A review before every merge. When I ran too many agents in parallel I hit a usage limit, so after that it was one coordinator and at most two children at a time.
I used Grok Bot to orchestrate the workflow and delegate the work to the agents. I also used pstack to help speed up delivery and improve the quality of how the agents executed.
The agents stalled at passkeys, dashboard logins and product calls, not at the code. Each time a step needed a human to sign in, the work stopped until I was there, and that cost more waiting than any bug. My hour a day went on product calls, reviewing, testing on my phone and the steps only a person can do.
I do sometimes miss looking at the code. But understanding how a system is structured, and shaping how it flows, without knowing every line of the implementation, gives me a lot of satisfaction.
The way I think about it is Lego. Rather than designing each block one by one and then stitching them together, I can produce the blocks very quickly and focus on how they fit together.
Connecting was quick. Understanding the data took longer
I expected the data feeds to be the hard part. Connecting to the Kafka feed took minutes. The worker reads Network Rail's train movement and signalling feeds over STOMP and National Rail's Darwin Push Port over Kafka, and publishes positions to Supabase Realtime.
The hard part was identity and time. Three feeds describe the same train in different ways, and you have to decide that they are the same train. Times arrive without dates, so a train that crosses midnight has to land on the right day. And when the worker restarted, it first forgot every running train and the map emptied for an hour or more, until it learnt to rebuild them at startup.
One decision I would have made too quickly. I planned to switch how the map places trains, from movement reports to live forecasts. I would have switched on instinct. An agent measured both against where trains actually arrived first.
It isn't solved. Where a train reports its position, the map shows it as live. A train counts as live while its latest signalling report is under three minutes old. After that its position is interpolated along the track between timing points, and capped so the marker never overshoots a station the train hasn't reported reaching. Between reports the position is estimated, and some estimated trains still appear off the railway line. Some stretches have no automatic reporting, so a train there can show as estimated for a long time.

Imagining it is not the same as seeing it
When the map first filled with live trains, what I found most interesting was the density. It looked roughly how I had imagined it.
But imagining something and seeing it in front of you are two different things. I knew what to expect, and it still felt new.
When go live didn't mean live
Then I said go live.
Production had never actually been deployed. Deploys from the main branch were switched off in the config, so the live address returned a not found error. Nobody noticed until I asked. The fix was merged the next morning.
My first reaction wasn't to look for a bug. It was to check my own language. Did "go live" mean to the agent what it meant to me? I think that was the gap. I had a picture of the outcome in my head. The agent had a list of steps. The two didn't quite meet.
Verification is the real work
When I write typed code, part of the verification comes for free. Types give me deterministic guarantees about certain properties, like the shape of the data moving through the system. If something doesn't fit, it doesn't compile, and I know straight away. What types don't tell me is whether the behaviour is correct, or whether the code does what I meant.
With LLMs and agents, that gap gets wider. The output looks right. The summary says done. The tests the agent wrote are green. None of that tells you whether it does what you meant.
So verification has to be designed on purpose, as a mix of two kinds. Deterministic checks: tests, types and a real look at production rather than a report about it. And judgement: an agent asked to look for gaps and weigh the evidence, and a person using the app and noticing that something feels wrong. Neither is enough on its own. The empty search and the share link passed every deterministic check. A deploy that didn't exist passed every summary.
I wrote in an earlier post that what interests me now is how we verify agents' work. This project made that much more concrete for me.
Some of it is still not finished. When I dropped my internet connection, the offline flag came up, and reconnecting brought the live feed back. That worked in my own test. I have since tried it on the move over 4G/5G, and it feels faster than the National Rail app, though that is how it feels to me and not a measurement. I have ideas to improve it further. The check that the first train appears quickly on a slow 4G connection is still marked as a known failure.
Going public changes the threat model
The first version was built to work, not to be attacked. The map was meant to be read only. Yet anyone with the site's public key could broadcast made up train positions to everyone else watching. The map did exactly what it was built to do, and it still let a stranger put fake trains on other people's screens. Working correctly and being safe are different questions.
The fix was private, receive only channels for browsers, so only the worker can publish, and an end to end test that sends fake positions and checks that no viewer sees them. The old presence feature, which tracked who was watching, also sent every change to every member, so its message count grew with the square of the viewers. Moving to private channels fixed that cost problem as well as the security one.
The lesson for me is about timing. The site went public first and this hardening came in the hours after. The repo's security notes still list a few smaller gaps accepted for now, so I won't claim it's secure. Deciding that something will be public changes the questions you ask, and they belong at the start, not after launch.
Building it for free
I built it without spending any extra money. Hosting and the database run on free plans, and the worker now runs on a small cloud server. The free plans turned out to be a design constraint more than a limit.
Free plans cannot send you a bill, but they can pause your project. So a spike in traffic is not a cost problem, it is an outage. My rule was that the site should degrade rather than stop. That shaped the design: caching, live updates only where someone is watching and limits on share links.
The live updates are the fragile part, so they step down in stages. The worker keeps its own count of the live messages it sends each month. At 60% of the free allowance it slows its updates from every five seconds to every fifteen. At 95% it stops sending them, and browsers go back to polling cached live data. The map gets less smooth, but it keeps showing trains. There is also a demo mode with a built in sample timetable, but that is a manual fallback that needs a redeploy.
None of this is a guarantee. The worker only counts what it sends, while the provider also counts every delivery to each viewer, so real usage is higher. It makes the map more likely to stay up, not certain to stay inside the allowance.
What I would do next time
First, agree the language before the work. For bigger decisions I would ask the agents to play back their own understanding of my idea in a brief, so I can see how they have understood me. And I would create a glossary at the start, so "go live" or "done" means the same thing to both of us. I already do this in another project. I skipped it here, assuming this one would be easier.
Second, describe the outcome, not the steps. "Production means live" is an outcome. A list of deployment steps is not. If the agent knows the full outcome I want, it can decide the steps, and it can tell when it hasn't reached it.
Third, bring human taste and visual feedback in earlier. Using the app on my phone found things that no test did. The sooner that happens, the less the agents build on top of assumptions.
This is a personal, unofficial and non commercial project built on open rail data. The code is open source under the MIT licence.
So what would it take? About four days and about an hour a day of my time, mostly from my phone. The building was the fast part. Agreeing what we meant, and checking that what came back was really done, is where the real work was. Next time, that is where I will put my hour a day first.
My thoughts, captured through dictation and interviews. Structured and edited with AI.