Cloudflare SFU as a commodity pipe
Outbound UDP only—no SFU cluster to operate, no TURN server, no open inbound ports. Cloudflare bills egress only ($0.05/GB after 1,000 GB/month free).
Elixir · Phoenix · Cloudflare Realtime SFU
Run voice and vision agents directly inside your Elixir app—calling Ecto, PubSub, and LiveView tools natively, from 1-on-1 calls to multi-party rooms.
Zero media infra to operate. Cloudflare Realtime SFU carries the WebRTC packets—no TURN server, no open inbound ports, and live calls that survive deploys.
What It Looks Like
defmodule MyApp.Assistant do
use Octoroom.Agent
alias Octoroom.Agent.Pipeline.Spec
@impl true
def instructions(ctx),
do: "You are a voice assistant on a call for #{ctx.args.workspace}. Be brief."
@impl true
def tools(_ctx), do: [MyApp.Tools.set_theme()]
@impl true
def pipeline(_ctx) do
Spec.default(
stt: "soniox:stt-rt-v6",
llm: "google:gemini-3.5-flash",
tts: "tiny_voca:tiny-voca"
)
# Or speech-to-speech / audiovisual:
# Spec.gemini_live(model: "gemini-3.8-live", voice: "Puck")
# Spec.openai_live(model: "gpt-live-1.1", voice: "marin")
# Spec.nuance_live(persona: "sam")
end
endWhy Octoroom
Outbound UDP only—no SFU cluster to operate, no TURN server, no open inbound ports. Cloudflare bills egress only ($0.05/GB after 1,000 GB/month free).
Pure Elixir callbacks decide who hears and sees whom—per-track gain, whisper tracks, data-only outputs, and dynamic server-side workers.
Signed resume tokens adopt existing Cloudflare sessions with zero WebRTC renegotiation. Workers checkpoint state and restart cleanly.
Run Silero VAD, SmartTurn, Soniox/AssemblyAI/Reson8 STT, ReqLLM, local TinyVoca ONNX TTS—or swap to Gemini Live, OpenAI Live, or Nuance Live avatars.
Drop-in browser ES modules (octoroom.mjs) plus a native iOS 17+ and macOS 14+ SwiftPM SDK speaking the exact same Phoenix channel protocol.
Paced Opus outlets report exact dropped_ms on interruption so agent history matches what humans heard. Full Elixir, JS, and Swift suites run 100% offline.
Try It
examples/callZero accounts neededLiveView group video call with echo, metronome, and recording workers—runs locally via Octoroom.Cloudflare.Local.
examples/visionCamera + ScreenVoice + vision agent that sees your camera and shared screen, switching between Cascaded (TinyVoca) and Gemini Live mid-call.
examples/agentLatency & Pipelines1-on-1 voice agent timing every turn end-to-end as heard in the browser, plus a deterministic scripted booking agent.
examples/meetMulti-AgentGroup video call with multiple AI assistants, decision-model routing, and the live Voice Timeline latency waterfall.
examples/iosSwiftUINative iOS app joining the exact same Phoenix rooms and speaking to the same AI agents.