Building Toyo on Cloudflare

An AI Computer that grows your business whilst you sleep

Damien Tanner - Toyo AI
Cloudflare Connect - 2026

What you'll learn today

Part 1: The vision

What is Toyo and what can it do?

Part 2: The ingredients

The primitives an autonomous agent needs

Part 3: In the box vs out of the box

Where should the agent loop run?

Part 4: The architecture

How it all fits together on Cloudflare

Part 5: Context & superpowers

Voice onboarding, sub-agents, and scheduled agents

Part 1: The vision

An AI employee for every business owner

Vision > Ingredients > In vs out of the box > Architecture > Superpowers

The OpenClaw moment

  • There's been an explosion in OpenClaw-style AI agents - agents with their own computer
  • You communicate with them like a team member
  • They have tools, connect to your existing apps, and have a persistent file system
  • It's a magical experience... but takes hours to set up and often breaks

Our mission: bring the power of the AI employee to business owners, no matter your technical experience - easy and instant to set up

Part 2: The ingredients

What primitives does an autonomous agent need?

Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Ingredients for a great agent

Agent loop
LLM calls, state management, tool orchestration
Tools
MCPs, bash, files, web browsing
A computer
A persistent VM with file system, memory, and installed apps
Sub-agents
Delegate complex tasks to specialist agents with their own context
Cron
Scheduled agents that run tasks on a recurring basis
Messaging
iMessage, WhatsApp, Telegram, web chat, voice
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Ingredients for a great agent

Agent loop
LLM calls, state management, tool orchestration
Tools
Bash, file system, web browsing, API calls via a sandboxed VM
A computer
A persistent VM with file system, memory, and installed apps
Sub-agents
Delegate complex tasks to specialist agents with their own context
Cron
Scheduled agents that run tasks on a recurring basis
Messaging
iMessage, WhatsApp, Telegram, web chat, voice
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Ingredients for a great agent

Agent loop
LLM calls, state management, tool orchestration
Tools
Bash, file system, web browsing, API calls via a sandboxed VM
A computer
A persistent VM with file system, memory, and installed apps
Sub-agents
Delegate complex tasks to specialist agents with their own context
Cron
Scheduled agents that run tasks on a recurring basis
Messaging
iMessage, WhatsApp, Telegram, web chat, voice
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Ingredients for a great agent

Agent loop
LLM calls, state management, tool orchestration
Tools
Bash, file system, web browsing, API calls via a sandboxed VM
A computer
A persistent VM with file system, memory, and installed apps
Sub-agents
Delegate complex tasks to specialist agents with their own context
Cron
Scheduled agents that run tasks on a recurring basis
Messaging
iMessage, WhatsApp, Telegram, web chat, voice
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Ingredients for a great agent

Agent loop
LLM calls, state management, tool orchestration
Tools
Bash, file system, web browsing, API calls via a sandboxed VM
A computer
A persistent VM with file system, memory, and installed apps
Sub-agents
Delegate complex tasks to specialist agents with their own context
Cron
Scheduled agents that run tasks on a recurring basis
Messaging
iMessage, WhatsApp, Telegram, web chat, voice
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Ingredients for a great agent

Agent loop
LLM calls, state management, tool orchestration
Tools
Bash, file system, web browsing, API calls via a sandboxed VM
A computer
A persistent VM with file system, memory, and installed apps
Sub-agents
Delegate complex tasks to specialist agents with their own context
Cron
Scheduled agents that run tasks on a recurring basis
Messaging
iMessage, WhatsApp, Telegram, web chat, voice

Part 3: In the box vs out of the box

Where should the agent loop run?

Vision > Ingredients > In vs out of the box > Architecture > Superpowers

We started in the box

How OpenClaw and similar agents work - and how we started:

  • The agent loop runs as a process inside the user's VM
  • Like claude running on your computer
  • It's right there next to the file system, can run bash commands directly
  • The chat experience is served from this same process
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

What went wrong

  • Reliability - if the VM slows down or runs out of resources, the entire chat experience degrades
  • Security - part of our code runs inside the user's VM
  • Observability - hard to monitor and debug across hundreds of user VMs
  • Scaling - managing processes in individual VMs is painful
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Agent out of the box

We moved the agent loop out of the VM and into a Durable Object:

  • Chat, LLM orchestration and persistence is now on Cloudflare
  • Uses Cloudflare Agents with AIChatAgent
  • The VM becomes a thin API - just bash and file read/write

Result: faster, more reliable, more secure, and way easier to observe

Treat the VM as an external tool resource, not the runtime

Part 4: The architecture

How it all fits together

Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Key components

  • MessagingBridgeDO - handles channel-specific protocols, bridges messages into the agent
  • AgentDO - the brain, per-session, built on Agents SDK with AIChatAgent
  • ScheduledAgentsDO - manages DO alarms for scheduled agent runs
  • Child AgentDO - sub-agent sessions spawned by the parent agent
  • RuntimeDO - per-user VM bridge, exposes bash and file ops as tools
  • toyo-server - daemon running on the VM
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Messaging bridge

Messages arrive from iMessage, WhatsApp, Telegram, and web chat - each with its own protocol

  • MessagingBridgeDO - one per channel, handles the channel-specific API
  • Normalises messages and forwards them over WebSocket to the AgentDO
  • Each bridge maintains its own state in Durable Object SQLite
  • Adding a new channel just means adding a new bridge
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

The agent brain

AgentDO is the core of the system - one per session, built on the Agents SDK

  • Uses AIChatAgent
  • Calls the LLM via AI Gateway
  • Manages a single long-running conversation - no sessions sidebar like ChatGPT
  • When the context window fills up, it rolls over into a new session automatically
  • Has tools for bash/file ops, spawning sub-agents, and managing schedules
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Sub-agents

On messaging channels there's one long-running conversation - no sidebar sessions

Problem: research or coding tasks consume the entire context window

Solution: the main agent spawns sub-agents in their own AgentDO

  • Main agent uses a fast, smaller LLM with a long context window
  • It chooses the right model per task - GPT 5.3 for coding, Sonnet 4.6 for creative work
  • Sub-agents run independently, don't pollute the main context
  • Results get injected back into the parent session when done
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Scheduled agents

Agents that work while you sleep:

  • Users configure scheduled tasks through the chat
  • The main agent has tools to create and manage its own schedules
  • ScheduledAgentsDO uses Durable Object alarms to trigger runs
  • Each scheduled run creates a normal agent session
  • When done, notifies the user via email or messaging channels
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Secure VM connectivity

The VM daemon boots up and makes an outbound WebSocket to the RuntimeDO

  • No inbound connections to the VM - no ports exposed
  • RuntimeDO provides tools for: bash, read_file, write_file
  • Workers proxies monitor and control all traffic in and out

Part 5: Context & superpowers

An agent is only as good as the context it has about you

Vision > Ingredients > In vs out of the box > Architecture > Superpowers

An agent is only as good as its context

How do you give an agent enough context to be genuinely useful from day one?

  • Sign up at toyo.ai and start onboarding
  • Toyo calls you on the phone and interviews you about your business
  • Collects your goals, tools, workflows, and what you want to automate
  • This context configures skills and scheduled agents automatically
Vision > Ingredients > In vs out of the box > Architecture > Superpowers

Voice agent demo

Toyo calls the user, interviews them about their business, and configures their agent

Vision > Ingredients > In vs out of the box > Architecture > Superpowers

A love letter to Durable Objects

Every core piece of Toyo runs in a Durable Object
AgentDO
Chat sessions
Child AgentDO
Sub-agents
ScheduledAgentsDO
Cron
VoiceDO
Voice calls
MessagingBridgeDO
Messaging
RuntimeDO
VM connectivity
"The most enjoyable piece of infrastructure I've ever worked with.
The infrastructure takes care of itself."

Thank you

Damien Tanner - toyo.ai