Minimal examples of the handy building blocks for building AI agents on Cloudflare. Each one is the smallest thing that shows the feature.
| Example | Feature | What it shows |
|---|---|---|
| counter | Agents SDK | A stateful Agent synced to a React client in real time |
| workers-ai | Workers AI | Run an LLM on the edge via the AI binding |
| schedule-tasks | Schedule tasks | An Agent runs work later with this.schedule() |
| workflows | Workflows | Durable, multi-step jobs with step.do() |
| browser-run | Browser Run | Screenshot a URL with a quick action |
More:
- chat — Streaming AI chat agent (
AIChatAgent) - push-notifications — Web Push from an Agent
pnpm install
Then run any example (see each folder's README for how to try it):
cd examples/counter
pnpm dev