I built Bob, a coding agent on Cloudflare that fixes my issues
Meet Bob, the handyman of my repos: an autonomous coding agent that runs entirely inside a Cloudflare Worker.

Meet Bob !
Bob lives on Cloudflare. I open an issue, I mention him, and he takes care of the rest. He reads the code, fixes the problem, commits, opens a pull request ready for me to review and merge, and gives me a link to follow what he is doing.
I called him Bob, like "Bob the handyman". He is not a chatbot in a sidebar that I have to babysit. He is an agent that receives a job and does it on his own.
This post is the story of why I built him, how he works under the hood, and why I think Cloudflare is a very good place to run this kind of agent.
What Bob actually does
The flow is simple. The example in the screenshots is a real one: I wanted a small floating button on my blog to change the text size of an article.
I go to one of my repositories and open an issue. I ask for a small feature, or I explain a bug I want to fix. Then I mention @bob and I describe what I want.

A few seconds later, Bob comments on the issue. He says he is on it, and he gives me a link. If I want, I can open that link and watch what he is doing. But I don't have to. He is autonomous.

When I click on the link "You can follow my work here", I arrive on a web page where I can actually see the agent working with all the calls it makes to the different tools.

He clones the repository, reads the files, searches the code, makes his changes on a dedicated branch, and commits. Then he opens a pull request.
When he is done, my CI runs on the pull request. I use Gitea Actions.

For a Cloudflare Workers project, I also get a preview URL.
That means I can open the result in my browser, hosted on Cloudflare, and check the change without deploying anything myself.

Then I can preview the PR (check the URL, you can see that this URL is only for the PR #10)

If the CI is green and the preview looks good, I review the PR and merge it.
For now I use Bob mostly for small changes: a small fix, a small feature, a bit of cleanup. I think he could handle bigger things, but small tasks are already where he saves me the most time.
The problem I wanted to solve
Before Bob, my process was the classic one. I read the code, I opened VS Code, I made the changes by hand, I ran the checks, I committed, I pushed, I opened the PR.
It works. But it takes time. And there is still a lot of manual validation in the middle: reading the diff, checking the build, checking the result.
I wanted to see what I could automate. Not the whole job, just the part where I spend time on something that is already well described.
That is the idea behind Bob: I describe the task in an issue, the way I would describe it to a colleague, and he does the first pass. I keep the review and the decision to merge.
How I built Bob
Bob is built with Flue, an open source framework for agents. It comes from the team behind Astro, who are now at Cloudflare. The framework is simple and clear: you write a small piece of code, and you have an agent. You can read the code and understand what it does, which is not always the case with agent frameworks.
The whole agent fits in one file. Here is a simplified version of it:
'use agent';
import { useModel, useSandbox, useSkill } from '@flue/runtime';
export function Bob() {
useModel('cloudflare/@cf/deepseek-ai/deepseek-v4.1-flash-1017');
useSandbox(getComputerSandbox());
useSkill(specDrivenDevelopment);
return 'You are Bob, my autonomous coding agent...';
}I use a DeepSeek model served by Workers AI. I also gave Bob a system prompt and a few skills that explain how he should work: write a small spec first, then write tests, then implement. The point is not to let him improvise. The point is to give him a clear method.
The interesting part is where Bob does the work.
Usually, an agent that needs to clone a repo and run commands needs a container. A Docker container, a VM, something with a filesystem and a shell. That means startup time, something to manage, and a cost that runs even when nobody is using it.
Bob does all of this inside a Worker.
The repository is cloned into a sandbox defined with Cloudflare Computer, inside the Worker itself. Bob can clone the project, list files, read them, run grep, run cat, edit files, and run Git commands. Under the hood it uses just-bash, a minimal implementation of the shell tools an agent needs, written in JavaScript.
So there is no container to start. No machine to keep alive. It is a serverless function that wakes up when there is work, and it is very light and very cheap.
To trigger Bob, I use a webhook. When someone mentions him on an issue, the event is sent to the Worker and Bob starts. It is the same mechanism I would use with GitHub, but here everything runs on my own Gitea instance.
The last piece is access.
Bob runs in the cloud, on Cloudflare. But my Git instance is not in the cloud. It runs at home, on a small machine in my living room. To let Bob reach it, I expose it through a Cloudflare Tunnel, and I protect it with Cloudflare Access.
Bob has his own service token. Nobody else uses it. So when I look at the Access logs, I can see exactly what Bob did and when he accessed the application. That was important for me: an agent with access to my code should be easy to follow.
Here is the full sequence, from my issue to the preview URL:

Why Cloudflare is a good fit for this
There are four things that make this setup work well.
The first one is Workers. The agent runs as a Worker, so there is no server to patch, no container to restart, no machine to keep awake. It scales with the requests, and when there is nothing to do, there is nothing running.
The second one is the sandbox. Cloudflare Computer gives Bob a filesystem and a shell inside the Worker. Cloning a repo, reading files, running Git, all of this stays inside the serverless function. That is the part that makes Bob cheap and fast to start.
The third one is Workers AI. I can call a model from the same Worker, with one binding, no API key to manage, and a clear view of what I spend. Changing the model is a one line change.
The fourth one is Access and Tunnel. My home Git server stays private. Bob reaches it through the tunnel with a dedicated service token, and I can audit what he does. The same Access layer also protects Bob's own interface, so only I can talk to him.
And on top of that, preview deployments are just there. Every pull request can get its own URL, so I can click a link and see the result before merging.
Try it
Bob is the first project of this kind that I use every day, and I am going to build more. What I like the most is how easy it is to create an agent like this, and how light and cheap it stays, thanks to Workers, the sandbox, and Workers AI.
If you want to try the same thing, you don't need a big setup. Start with one small repository, one small issue, and one agent. Give him a clear method, a way to reach your code, and a way for you to review the result. Then let him work.
If you have questions about the setup, the Flue framework, or the Cloudflare side, feel free to ask me. I am happy to share what I learned.
Comments
No comments yet