PRTL Labs
Software EngineerOct 2024 to Jun 2025Part-time, then full-time from Apr 2025
AI agents that plan and run marketing for local retail brands.
Each campaign runs as ten durable steps on Cloudflare. Every finished step is saved, so when one fails, only that step runs again.
The agent console
One request, and the plan that came back
Ask the agent one plain-English sentence
The plan recorded reply
01 of 04Case studyFilm 1:39
How the agents plan, run and schedule a campaign

Windows and cards come from the product's own agent code, run locally on invented data, in a console made for this demonstration. The model's reply is a recorded stand-in, outside services are stubbed and nothing was posted. The Instagram failure was forced and some waiting cut. Drawn: posts, tiles, headlines, pointer, MCP scene (MCP, a standard way agents call tools).
- steps from a local trend to a post
- 10
- Durable Object (a small server) per task
- 1
- of the agent's code from my commits
- 99%
At PRTL Labs I worked on AI agents that run marketing for local retail brands. We tried to get several agents working together on Cloudflare, and the parts below are the ones I designed and built.
How I did itHide how I did it
A local shop wants posts that feel local. I built the agent that turns one typed sentence into a planned campaign, runs its ten steps, recovers when one fails, and sets an alarm for anything scheduled.
Transcript
The film has music and no voice. These are the words that appear on screen, in order.
Local shops need posts that feel local.
Making one meant starting every job by hand.
Now it takes one sentence.
The agent reads it and writes its own plan.
It picks its tools and says why.
Then it runs the campaign in ten steps, and saves each one as it finishes.
It finds what's happening in town and writes about that.
If a step fails, only that step runs again.
Tell it when, and it sets its own alarm.
Every scheduled post gets its own alarm.
When the alarm rings, the campaign starts itself.
Other agents can call it too, over MCP.
One sentence goes in, and a running campaign comes out.
PRTL Labs
AI agents that run marketing for local retail brands.
02 of 04Agent orchestration
Turning a sentence into workflows

- tools the agent chooses between
- 4
- ways other programs can call it
- 3
- of the agent's code from my commits
- 99%
An agent here is a program that reads a request, picks its own tools and uses them. Our pipelines were separate jobs that someone had to start with the right settings. I designed and built one agent to start them all. Other programs call it over SSE, a connection that stays open and streams the reply, over plain HTTP, or directly over RPC, a call from one program straight into another.
03 of 04Durable pipeline
A campaign as ten durable steps

- durable steps from trend to post
- 10
- retries at most for a failed step
- 2 or 3
A campaign takes ten jobs in order, and most call an outside service that can fail. So it runs as one Cloudflare Workflow, one step per job.
04 of 04Scheduling
Scheduling: one object and one alarm per task

- alarm a Durable Object can hold
- 1
- Durable Object per scheduled task
- 1
- how often the old sweep ran
- 1 min
When I tested it, posts scheduled through the API fired on time. From chat, some did not, so adding checks there was next on the list.
Also at PRTL Labs
- Extended a teammate's knowledge-graph agent so it repairs its own database queries. When a generated query fails, the error and the schema go back to the model for a rewrite and another try.
- Found that the graph database lost its data whenever the host scaled down, because it wrote to local disk, and argued for running it on a VM.
- Set up builds on Google Cloud with triggers that rebuild only when the paths they watch change.
4 moreShow fewer
- Merged the separate agent and workflow apps into one TypeScript monorepo, with one set of schemas shared by the workflows, the agents and the APIs.
- Before the platform, built agents on the open-source Pippin framework. One checked basketball scores every hour, made a highlight image and posted it to X. Another posted weekly marketing and sent advertising notifications.
- Built loyalty sign-up pages that put a membership card straight into Apple Wallet or Google Wallet, picking the right one for the phone.
- Added Google sign-in, email verification and analytics to a chat CRM, and ran a loyalty-points sync as a scheduled Kubernetes job.
Next project
HelpHive
Final year project
A marketplace where hotels book housekeeping staff by the hour, with an Android app for hotels and providers, a web app and an admin console.
25 kmjobs nearby arrive as an alert