pipedog is an unofficial community port of Pipecat, not affiliated with Daily.
pipedog

Workers code off Cloudflare (OpenOrange)

Run the Durable Objects voice agent unchanged on AWS, Google Cloud, Azure or your own servers with Rivet's OpenOrange.

OpenOrange (by Rivet) runs an existing Cloudflare Workers project outside Cloudflare. It reads the Wrangler configuration, runs the Worker on Node.js and runs each Durable Object as a Rivet Actor with its own SQLite storage. You deploy it to Rivet Cloud, to your own AWS, Google Cloud or Azure account, or self-host it.

So the voice agent from Voice agents on Workers and Durable Objects runs there without changes: one Durable Object per session, over the WebSocket transport.

client ──WebSocket──► Worker ──getByName(id)──► VoiceSession (Rivet Actor)
                       (Node.js, OpenOrange)       │ FastAPIWebsocketTransport
                                                   │ OpenAI realtime transcription (turns)
                                                   │ chat, speech synthesis

What is verified

The example's end-to-end test runs against orange dev (OpenOrange 1.0.1) as well as wrangler dev, with the same checks:

  • two sessions run in parallel, each on its own Durable Object, and each hears its answer;
  • a pipeline error reaches the error webhook, and spans are flushed when a session ends;
  • a request that isn't a WebSocket upgrade is refused;
  • a client that reconnects continues its conversation, through Durable Object storage and alarms.

Deploying with orange deploy, to Rivet Cloud or your own cluster, is not tested here.

Needs pipedog newer than 0.10.0. On Workers, pipedog opens outbound WebSockets (to speech providers) with fetch() and an Upgrade header, which OpenOrange's fetch rejects. pipedog now falls back to the WebSocket constructor, which sends the same headers there.

Run it

Install the CLI, then run the example as you would with Wrangler:

npm install -g open-orange
cd examples/workers-durable-voice-agent
echo "OPENAI_API_KEY=sk-..." > .dev.vars
orange doctor   # checks the project and lists how each binding runs
orange dev      # instead of wrangler dev

Stream a recording to a session from a second terminal, as on Workers:

bun run client ws://127.0.0.1:8787/api/session/alice ../test-mocks/assets/capital_question.wav

Run the end-to-end test against OpenOrange (no API key needed; it uses the mock OpenAI server):

WORKER_RUNTIME=openorange bun test test/e2e.test.ts
# ORANGE_BIN=/path/to/orange if it isn't on your PATH

To deploy, see OpenOrange's deploy guide: orange deploy for Rivet Cloud, or orange deploy --dry-run to build a container image to run yourself.

What changes from Cloudflare

Cloudflare WorkersOpenOrange
RuntimeworkerdNode.js, with the Workers APIs on top
Memory per session object128 MBthe machine's (Node's default heap is about 4 GB)
Worker size10 MB compressed (paid plan)no limit
CPU timeplan limitsno limit
Workers AI (env.AI)Cloudflare's modelsmapped to an OpenAI-compatible provider you configure
WebSocket hibernationyesemulated: the object stays awake while a socket is open
A deploykeeps running sessionscloses open sockets

What that means for a voice agent:

  • Local turn detection fits. Silero VAD and Smart Turn are too big for a Worker (see the size table). Without the size and memory limits they can run in the Durable Object, as on a server. This isn't covered by the example's tests yet.
  • Workers AI services. @pipedog/cloudflare's streaming services (Flux, Nova-3, Aura) use the AI binding's WebSockets, which OpenOrange doesn't map. Use their REST path instead, with an account ID and an API token: it reaches Cloudflare from anywhere.
  • Deploys end calls. A deploy closes open sockets. Clients that reconnect within ten minutes continue their conversation (see Reconnection).
  • Transport. It is still the WebSocket transport. OpenOrange doesn't document inbound UDP, so don't plan on SmallWebRTC there; for WebRTC users, keep Cloudflare Realtime in front.

Moving sessions from Cloudflare

orange migrate copies Durable Objects from Cloudflare while the app serves. It can't copy a KV-backed class (one declared under new_classes, as in the example), and orange doctor warns about it. Voice sessions only keep a conversation for ten minutes after a call, so you can simply switch over. For a new project you plan to move, declare the class under new_sqlite_classes.

pipedog is an unofficial community TypeScript port of Pipecat. It is not affiliated with or endorsed by Daily or the Pipecat project.

Portions adapted from the Pipecat documentation, Copyright (c) 2024–2025 Daily, BSD-2-Clause (see apps/docs/LICENSE-pipecat-docs).

On this page