Cloudflare agent stack for hackathon teams

Start with Flue. Reach for the SDK when you need the runtime.

Choose the right harness before you compose products. This kit connects each decision to a current starter that can run locally and deploy on Cloudflare.

Choose the harness

Flue first. Branch when the requirement tells you to.

The choice is about harness and runtime control, not which logo a team prefers. Start with the highest-level path that still exposes the capability you need.

01 / Default

Flue 2.1

Autonomous agent with Pi

Choose Flue for hooks, skills, subagents, tools, channels, durable conversations, and optional local or remote sandboxes.

  • Best default for new agent projects.
  • Deploys to Workers and Durable Objects.
  • Uses Pi for model providers and harness behavior.
Start with Flue

02 / Runtime control

Agents SDK

No Pi or SDK-specific primitives

Choose Agents SDK for direct state and RPC APIs, AI SDK integration, custom lifecycle behavior, Workflows, Browser Run, Voice, MCP, and WebSocket control.

  • Lower-level and more composable.
  • Strong fit for real-time product experiences.
  • Includes experimental non-Pi harness work.
Open Agents Starter

03 / Existing harness

Sandbox

Run Codex, Claude Code, or OpenCode

Choose Sandbox when the agent is an existing CLI or server harness that needs a full Linux environment, isolated credentials, files, previews, and policy-controlled egress.

  • Workers Paid plan required.
  • Docker-backed local development.
  • Examples exist for Codex, Claude Code, and OpenCode.
Open Codex path

Fast starts

Six paths that can carry a complete demo.

These cover the default framework, the Cloudflare SDK, an isolated coding harness, durable work, multi-agent delegation, and browser automation.

Recommended default

Start here

Flue 2.1 on Cloudflare

Build an autonomous TypeScript agent with a programmable hooks-based harness, Pi model providers, durable conversations, tools, skills, subagents, channels, and optional sandboxes.

Quick start
npx @flue/cli@2.1.0 init my-agent --target cloudflare
cd my-agent
npm install
npm run check:types
npm run dev
npm run deploy
Flue hooksPi harnessDurable ObjectsSkillsSubagents
  • Use Flue first for a new autonomous agent. Move to Agents SDK when you need non-Pi harnesses or SDK-specific lifecycle and communication primitives.
  • The Cloudflare target composes Flue's generated agent classes with the Cloudflare Agents SDK runtime.

Cloudflare Agents SDK

SDK path

Agents Starter

Start a real-time React chat agent with AI SDK models, Workers AI, state sync, tool calls, durable approvals, scheduling, vision, and WebSockets.

Quick start
npm create cloudflare@latest -- --template cloudflare/agents-starter
cd agents-starter
npm install
npm run dev
npm run deploy
AI SDKReactApproval toolsState syncWebSockets
  • Choose this when you do not want the Pi harness or need direct Agents SDK APIs and lifecycle control.

Non-Pi coding harness

Advanced

Codex App Server

Run Codex in a Cloudflare Sandbox behind a WebSocket middleman, with a streaming UI, composable policy handlers, restricted egress, and secret injection outside the container.

Quick start
git clone --depth 1 https://github.com/cloudflare/sandbox-sdk
cd sandbox-sdk/examples/codex-app-server
cp .dev.vars.example .dev.vars
npm install
npm run dev
npm run deploy
CodexSandboxWebSocketsEgress policyCredential isolation
  • Requires a Workers Paid plan, Docker, and an OpenAI credential.

Agents plus Workflows

Runnable example

Concurrent workflows with approval

Launch durable concurrent jobs from an Agent, stream progress into synchronized state, and pause for human approval without losing execution history.

Quick start
git clone --depth 1 https://github.com/cloudflare/agents
cd agents/examples/workflows
npm install
npm run types
npm run start
WorkflowsHuman approvalProgressDurable execution

Multi-agent systems

Advanced showcase

Agents as Tools

Delegate to subagents, fan out work in parallel, detach long-running tasks, stream progress, cancel runs, and inspect durable milestones.

Quick start
git clone --depth 1 https://github.com/cloudflare/agents
cd agents/examples/agents-as-tools
npm install
npm start
SubagentsBackground runsFan-outCancellationProgress
  • The example's search and file-inspection tools are simulated; replace them with real tools for a project.

Browser Run

Beta

Browser Live View

Automate a persistent browser session, expose its live view, hand control to a human for blocked steps, and resume the agent after intervention.

Quick start
git clone --depth 1 https://github.com/cloudflare/agents
cd agents
pnpm install
cd examples/browser-live-view
pnpm start
Browser RunLive ViewHuman handoffDurable CDP

Extensions and labs

Add a capability, not another architecture.

Use these when voice, retrieval, MCP, on-demand skills, code execution, or full app generation is central to the judging story.

Real-time voice

Beta

Voice Agent

Add speech-to-text, model turns, tool calls, and text-to-speech over a real-time WebSocket connection.

Quick start
npm create cloudflare@latest voice-agent -- --template cloudflare/agents-starter
cd voice-agent
npm install @cloudflare/voice
npm run dev
VoiceSTTTTSWebSocketsWorkers AI

Stateful retrieval

Guided build

Agent with AI Search

Provision an AI Search instance, index content, and expose retrieval as a model tool from a stateful chat agent.

Quick start
npm create cloudflare@latest -- ai-search-agent
cd ai-search-agent
npm i agents @cloudflare/ai-chat ai workers-ai-provider zod
npx wrangler types
npm run dev
AI SearchRAGToolsStateful chat

Model Context Protocol

Recommended MCP path

Stateless MCP Worker

Publish tools through the current stateless MCP handler path on Workers, with Streamable HTTP and no protocol session Durable Object.

Quick start
git clone --depth 1 https://github.com/cloudflare/agents
cd agents/examples/mcp-worker
pnpm install
pnpm start
MCP SDK v2Streamable HTTPStatelessWorkers

On-demand expertise

Experimental

Agent Skills

Give an agent a catalog of instructions and resources that it activates only when a task matches, instead of putting every capability into every prompt.

Quick start
git clone --depth 1 https://github.com/cloudflare/agents
cd agents/examples/agent-skills
npm install
npm start
SkillsThinkOn demandContext control

Workers AI plus Sandbox

Runnable example

Code Interpreter

Use Workers AI function calling to write and execute Python in an isolated Sandbox with file operations and structured results.

Quick start
git clone --depth 1 https://github.com/cloudflare/sandbox-sdk
cd sandbox-sdk/examples/code-interpreter
npm install
npm run dev
Workers AIPythonSandboxFiles

Complete platform

Full stack

VibeSDK

Use a production-grade text-to-app platform built with Think, project Durable Objects, Artifacts, Dynamic Workers, Facets, and AI Gateway.

ThinkArtifactsDynamic WorkersFacetsAI Gateway

Set up the agent building your agent

Install Cloudflare Skills before composing the stack.

Claude Code and Cursor have dedicated plugin paths. OpenCode, Codex, Pi, and other compatible environments can install the same portable skill bundle.

Universal install
npx skills add https://github.com/cloudflare/skills

Resource map

Keep the source and current docs beside the code.

The repositories move quickly. Prefer their current examples and live documentation over copied package versions or old workshop snippets.

Framework

Flue

Hooks-based agent harness, Pi providers, CLI, Vite target, Cloudflare runtime, sandboxes, channels, and observability.

Runtime SDK

Cloudflare Agents

State, RPC, scheduling, Workflows, subagents, chat, Browser Run, Voice, MCP, email, push, and durable execution.

Isolated execution

Sandbox SDK

Containers, commands, files, code interpreters, tunnels, previews, and integrations for Codex, Claude Code, OpenCode, and OpenAI Agents.