← Back to explorer
Example workload/workloads/agents-sandboxes

Agents / Sandboxes

Build autonomous AI systems with secure, isolated execution.

For products where AI agents plan tasks, use tools, keep state over time, and sometimes run generated or untrusted code inside a constrained environment.

agentic aiai agentscoding agentcopilotassistant with toolssandboxed code executionvibe coding

Recommended primitives

Agents

core

Stateful AI agents built on Durable Objects with persistent sessions and tool use.

Stateful agent runtime with memory and live sessions

Sandboxes

core

Isolated execution environments for untrusted or user-submitted code.

Isolated execution boundary for risky or generated code

Durable Objects

supporting

Stateful single-threaded actors with strong consistency, storage, and WebSocket support.

Coordination and state for sessions, tasks, and updates

Workers

supporting

Serverless edge functions. The entry point for most Cloudflare apps.

Ingress, auth, orchestration, and application glue

Containers

optional

Run any language or runtime in containers on Cloudflare's network.

Full runtime for heavier execution environments

Workers AI

optional

Run foundation models and ML inference on Cloudflare's GPU network.

Inference layer for built-in model execution

Architecture notes

  • Agents keep session or task state and can stream updates back to the UI.
  • Sandboxes provide short-lived isolated execution for generated code, previews, and risky operations.
  • Workers remain the entry point for auth, orchestration, and app-specific APIs.

Starter prompts

I want a coding agent that can open repos, run tasks, and stream progress back to the UI.
We need an internal copilot that can use tools and safely execute generated scripts.
Build a vibe-coding product that turns prompts into runnable preview apps.

Avoid notes

Direct execution in Workers

Running arbitrary generated code directly in a plain Worker removes the isolation boundary this workload usually needs.

Consider: Use Sandboxes for untrusted or generated execution.

Over-classifying chatbots as agents

A prompt-response chatbot is not the same as an agent unless tool use or durable state is central to the design.

Resources

Try your own version

Start from one of these prompts or describe your own variation on the homepage to get a primitive recommendation.

Open the explorer