Introducing Agentflare
A cloud space for building with agents
- agentflare
- agents
- llms
- cloudflare
- d1
- r1
What is Agentflare?
I absolutely believe that agents deserve their own machines. I love Amp Orbs, and I use them for all my personal projects. If you don’t know about Orbs, they’re cloud machines where your agent harness runs. They have a lot of advantages, like:
- If you have a potato machine (I’m rocking a base 8 GB MacBook Air M2), you can offload big, heavy codebases to the cloud.
- You can control and interact with agents from literally anywhere without worrying about your machine going to sleep.
- No weird global config changes when running agents in “bypass
destructivemode”. - My favorite: you don’t have to worry about bloated dependencies eating up your storage (yeah, the base M2 MacBook Air comes with just 256 GB).
If I thought about it longer, I could come up with a few more, but I won’t bore you with them. Of course, there are some disadvantages too:
- You might not own the hardware, so you never know where your code might be going (although I trust Amp with my life. Not Dario or Sam, though).
- App development (especially iOS) which is my main job, can be a pain because Mac server farms are hard to come by.
- There’s the extra expense (Amp is cheap tho, $20 gets me through the month, ngl).
- You can’t always bring your own agents and subscription (though Amp supports this!).
- There aren’t many open-source solutions (I haven’t researched this much, so I could be wrong).
- I don’t like how Amp merges code back upstream. It’s great when you’re working solo, but not so much when you’re on a team that doesn’t use Amp.
- I hate worktrees, both local and cloud-based.
So I built Agentflare to address these issues (and because I’m trying out Cloudflare’s stack, hence the poorly chosen name)!
I’d describe Agentflare as ephemeral sandboxes where agents can work and then create PRs for you to review and merge.
How does it work?
You sign in and connect the Agentflare app to your GitHub repository, which creates a project. Then you connect your Codex subscription to Agentflare. After that, you can create threads, each with its own Codex thread and machine. Once the agent makes a change, you can create a PR to review and merge.
You can work on multiple threads and projects simultaneously, and review code changes directly in Agentflare or on GitHub.
For now, only Codex is supported through the Agent Client Protocol (ACP) (God bless Zed and JetBrains!). I plan to add support for more agents once I sort out the quirks.
It’s open source at GitHub and can be deployed to your Cloudflare account with Workers Paid (sandboxes require this; it costs $5 and comes with honestly generous usage limits).
Architecture
The entire stack is built on Cloudflare (not sponsored, but I hope they would).
Cloudflare Workers serve the application and API, D1 stores accounts, projects, and thread records, and a Durable Object coordinates each user’s runtime.
When you start a workspace, Agentflare provisions a Cloudflare Sandbox running Codex and checks out the repository from GitHub. Each user shares one sandbox across their threads, with a separate checkout and conversation for each thread. This also means you sign into Codex once and use that login across projects.
Sandbox disks are ephemeral, so R2 stores conversation snapshots and workspace archives. Conversations can save during a turn; full workspace checkpoints wait until the user’s threads are idle and the workspace is no longer actively being accessed. A replacement sandbox restores the latest successful checkpoint so you can continue later.
This is checkpoint recovery, not process recovery: files, Git state, and saved agent sessions can return, but running dev servers and process memory don’t. Closing the browser doesn’t delete your work, although a sudden failure can lose changes made since the last checkpoint.
Future?
I will be using Agentflare for my own personal work. I intend to add more ACP-supported agents alongside support for features provided by ACP. Honestly, would love contributions!
I am deploying a production version on agentflare.onlychan.xyz with a limit of 2 projects and 2 threads per project per user (I hope that doesn’t hit my Cloudflare limits or I would have to stop).
I think Cloudflare is ideal for these types of applications. I just found out about Artifacts (their Git hosting solution) and might integrate it into the platform. Also there’s a artifact hackathon so looking forward to the projects people are building with it (I don’t have the time to participate myself unfortunately and I am so done with hackathons. I just finished my uni lol).
Also if anyone from Cloudflare is reading this, would love to hear your thoughts and feedback on the platform (and maybe pay the bills 😭). And happy birthday week!
Also if you don’t care about open source solutions and are looking for a serious alternative, Amp is the absolute best harness and environment!