Documentation menu
Documentation

Local and cloud runtime

Run the same agent classes locally in workerd, package them with Bun, or deploy them to Cloudflare.

Three ways to run

ModeAgent runtimeBun hostBest for
ayjnt devWrangler workerdNoWeb UI and Cloudflare bindings
ayjnt run / compiledLocal workerdYesCLI, host tools, local products
ayjnt deployCloudflareNoGlobally available durable agents

Design portable capabilities

Agent code, state, schedules, workflows, and tools.ts can run locally or deployed. cli.ts and tools.host.ts are local-product capabilities powered by Bun.

If a host tool is optional in cloud mode, mark it with the documented optional-deploy marker and make the agent behave sensibly when the tool is absent.