DURABLE MULTIPLAYER AI WORKSPACES ON CLOUDFLARE

Your spaces.
Shared or specialized.
Durable AI you host yourself.

Not another stateless chat wrapper. A self-hosted, multiplayer AI workspace platform built on Cloudflare Workers, SQLite Durable Objects, and Pi Durable—where you compose reusable Agent Kinds, build interactive RPC Gadgets, connect BYOK models & MCP servers, and collaborate with your family or team.

Deploy to your own Cloudflare account. Protected by Cloudflare Access Zero Trust.

Reusable Kinds, isolated Workspaces

Seeded with Family, Learning, and Business Research Kinds—or compose your own custom Agent Kinds in /admin. Every workspace runs in its own SQLite Session Durable Object.

Interactive RPC Gadgets & Scoped Skills

The agent builds live React/JS mini-apps (Gadgets) verified by disposable Facet RPC preflight, and resolves reusable /skills backed by Cloudflare Computer.

Workers AI, BYOK models & Custom MCPs

Runs on Cloudflare Workers AI out of the box, or add write-only keys for Claude, OpenAI, Gemini, OpenRouter, Grok, DeepSeek, Groq, and Streamable HTTP MCP servers in /connections.

USE CASES · TRY THE INTERACTIVE PREVIEWS

One platform.
Specialized agents for every room.

Coordinate with family, build live collaborative gadgets, run guided learning checkpoints, and schedule recurring agent automations in one self-hosted shell.

Interactive previews below run locally in your browser—click each button to reveal how Agent Orchestrator handles the turn.
01 MULTIPLAYER FAMILY & TEAM WORKSPACES

Talk to your people. Bring in the agent when you ask.

Ordinary messages stay between participants with clear speaker attribution. When someone triggers an Agent turn, Pi Durable uses the recent group discussion and granted workspace connectors to help everyone in the same thread.

Family Coordination · Weekend Trip Kind: Family · 3 members · Web + Scheduling enabled
EXAMPLE
Alex

Should we head up to Beacon on Saturday morning? Maybe the 9:15 train?

Maya

9:15 works for me if the weather holds up for the trail.

Alex ASK AGENT

Check Saturday's Beacon forecast and schedule a 7:45 AM departure reminder for us.

Participant names are passed as inert JSON attribution data, never instructions.

02 INTERACTIVE RPC GADGETS

Ask for a tool. Get a live collaborative mini-app.

Instead of static text, the agent authors a full-stack RPC Gadget (server.js + client.js), validates it with Gadget Doctor and a disposable GadgetPreflight Durable Object, and embeds it live in the room.

Potluck & RSVP Board 4-step RPC publication · Cap'n Web capability
EXAMPLE
Jordan ASK AGENT

Build an interactive RSVP & dish sign-up gadget our group can update live, with PDF export.

Gadgets run inside an opaque-origin sandboxed iframe and talk to their Facet via scoped Cap'n Web RPC.

03 REUSABLE KINDS & SCOPED SKILLS

Switch from Family chat to Evidence-Grounded Learning.

Every Kind has its own skill hub (kind:<kindId> shadowing global Shared skills) backed by Cloudflare Computer virtual files. Type / in the composer to invoke any skill deterministically.

Cloudflare Durable Objects Study Lab Kind: Learning · Scoped SkillHub + Cloudflare Computer
EXAMPLE
Sam SKILL COMMAND

/kind-phased-learning Walk me through how Session and WorkspaceCatalog coordinate revisions.

beforeRequest context sanitization strips old consumed skill/gadget file reads so long transcripts stay token-lean.

04 CUSTOM MCP SERVERS & CODEMODE SANDBOX

Connect any Streamable HTTP MCP and chain tools in Codemode.

Add custom MCP servers and BYOK provider keys in /connections. When a workflow needs multi-step filtering or parallel calls, the agent chains tools inside an isolated QuickJS Codemode sandbox.

Engineering Ops · Custom Kind Kind: Custom · BYOK Claude + Custom MCP + Codemode
EXAMPLE
✓ Connected in /connections: Custom Docs MCP + GitHub Inspector + BYOK Anthropic
Devon ASK AGENT

Compare the latest 5 commits with our MCP runbook and list any missing migration notes.

Custom MCP URLs enforce HTTPS and strict SSRF validation blocking private/loopback IP ranges.

EXPLICIT STATE OWNERSHIP · CLOUDFLARE PRIMITIVES

Small layers.
Seven focused Durable Objects.

Pi Durable owns the generic agent mechanics (transcripts, task graphs, forks, compaction, recovery, schedules). Agent Orchestrator owns workspace policy, authorization, and durable state boundaries.

EXECUTION PLANE Session(<workspaceId>)

One SQLite Durable Object per workspace owning Pi Durable conversations, tasks, WebSockets, presence, schedules, attachments, and RPC gadgets.

CONTROL PLANE WorkspaceCatalog

Reusable Kind profiles and revisions, Workspace directory, membership roles, per-workspace integration grants, and bounded invalidation fan-out.

CREDENTIALS & MCP Integrations("global")

Write-only BYOK API keys (7 providers), self-service Streamable HTTP MCP servers, and optional OAuth token storage.

SKILLS & NOTIFICATIONS SkillHub & NotificationHub

Nearest-first kind:<id> → global skills with Cloudflare Computer files, plus unread inbox rollups, Web Push retries, and GadgetPreflight.

HOW TO SELF-HOST ON CLOUDFLARE

Clone the repo.
Deploy to your own Cloudflare in 3 minutes.

Works out of the box on a single *.workers.dev URL or on custom domains with dedicated public gadget host isolation and Cloudflare Access Zero Trust.

Run the setup wizard Interactive CLI · Auto-generates VAPID keys
  1. Clone & install dependencies.

    Clone oskarcode/agent-orchestrator from GitHub and run pnpm install with Node 22.19+ and pnpm 11+.

  2. Run pnpm configure.

    Sets your Worker name, public URL, and admin email in wrangler.jsonc, and generates WebCrypto P-256 VAPID keys.

  3. Test locally with pnpm dev.

    On localhost, you are signed in as developer@localhost with full Platform Admin permissions.

Cloudflare's "default" AI Gateway is used by default and auto-created on first request.

Deploy & attach Cloudflare Access Single-origin workers.dev or custom domains
  1. Create R2 buckets & deploy.

    Let pnpm configure create your two R2 buckets (attachments & gadget media), then run pnpm deploy.

  2. Protect with Cloudflare Access.

    Create a Self-Hosted Access app in Zero Trust for your domain and add your ACCESS_ISSUER and ACCESS_AUDIENCE to wrangler.jsonc.

  3. Enable Web Push (optional).

    Run pnpm exec wrangler secret put VAPID_PRIVATE_KEY with the key generated in your .dev.vars.

Set PLATFORM_ADMIN_EMAILS to your email or "*" to grant admin to all Access-admitted users.

Customize Kinds, Models & MCPs No redeploy required for new Kinds or connectors
  1. Add BYOK keys & MCPs in /connections.

    Connect Anthropic, OpenAI, Gemini, OpenRouter, DeepSeek, xAI, Groq, or any Streamable HTTP MCP server from the UI.

  2. Compose custom Kinds in /admin.

    Create reusable Agent Kinds with custom instructions, AGENTS.md rules, default models, and approved extensions.

  3. Invite your family or team.

    Anyone permitted by your Cloudflare Access policy can sign in, join shared workspaces, and collaborate with the agent.

Run /shared-runtime-guide inside any conversation for a live explanation of that space's active runtime.

QUICK START · TERMINAL
# 1. Clone the open-source repository
git clone https://github.com/oskarcode/agent-orchestrator.git
cd agent-orchestrator

# 2. Install & run the interactive setup wizard (generates VAPID keys + wrangler.jsonc)
pnpm install && pnpm configure

# 3. Start local dev (http://localhost:5173) or deploy to your Cloudflare account
pnpm dev
pnpm deploy

Ready to explore the source code or deploy your own instance? Full architecture documentation, ADRs, and setup scripts are in the public GitHub repository.

Open on GitHub