meir dick

Open source · Apache-2.0 · All four tools

cf-orbs

live

Amp coding threads on your own Cloudflare account.

cf-orbs is a self-hosted Amp orb provider, for developers and teams who use Amp. Each thread runs in its own Cloudflare Container (4 vCPU, 12 GiB, 20 GB disk by default). When Amp pauses the thread, the container snapshots and stops. Your next message restores it.

Setup guide ↗Benchmarks ↗GitHub ↗Site ↗

npx cf-orbs init --provider-name <name from Amp>

The problem

Vendor-hosted orbs run your repository inside someone else's cloud account.

Running raw Cloudflare Containers yourself has rough edges. There is no API to list snapshots. Snapshots save the disk but not memory. A busy container times out if its traffic stays internal. A cancelled exec call leaves its process running.

Benchmarks

p50 values. cf-orbs ran at 4 vCPU, 12 GiB. Amp-hosted orbs ran at 2 vCPU, 4 GiB, so the machines are not the same size. Full benchmarks ↗

New thread setup14.1 sAmp-hosted: 28.5 s
npm install express7.73 sAmp-hosted: 15.2 s
First tool round trip0.86 sAmp-hosted: 0.93 s
Message to first assistant reply17.0 sAmp-hosted: 32.6 s
Wake a paused orb9.88 sAmp-hosted: 0.75 s. cf-orbs is slower here.

How it works

  1. Outbound-only provider bridge. The amp orb provider process runs in its own small container. It makes outbound connections only. No inbound port is open.
  2. One Durable Object and one container per thread. cf-orbs implements Amp's self-hosted orb contract: spawn, pause and delete. Each action is idempotent.
  3. Safe disk snapshots on pause. Snapshots save the disk and not memory. So pause stops active work, syncs the filesystem, takes the snapshot, then destroys the container.
  4. Snapshot index and safe exec. A Registry Durable Object tracks every snapshot. exec wrappers pass environment variables, set timeouts, and stop child processes on cancel.

ContainersDurable ObjectsSnapshotsAmp orb contract

Install and use

You need a Cloudflare account on Workers Paid (the $5 a month plan), because Containers need it.

The setup guide has the full steps.

Questions

Will Cloudflare stop my container in the middle of a long build or test run?

No. A 60-second alarm keeps a busy orb alive while work runs in the container.

What stops a forgotten thread from staying awake?

A watchdog stops an orb that stays awake too long. The maxAwakeHours setting is 12 by default.

What happens when a Cloudflare snapshot expires after 30 days?

At startup, cf-orbs checks that the snapshot is ready. If it has expired, the thread starts from the base image.

The other tools

Same stack: agents on your own Cloudflare account. See the overview. For the platform gaps, read the RFC.

The lessons across all four tools, and the model behind them.What I learned →