Skip to content

Commit 68e70fa

Browse files
committed
[Dynamic Workers] update examples and getting started
1 parent 5f5cc70 commit 68e70fa

7 files changed

Lines changed: 26 additions & 22 deletions

File tree

public/__redirects

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
/deprecations/ /fundamentals/api/reference/deprecations/ 301
1616
/learning-paths/ /resources/ 301
1717
/markdown.zip /llms-full.txt 301
18-
/dynamic-workers/examples/codemode/ /agents/api-reference/codemode/ 301
18+
/dynamic-workers/examples/agents-executing-code/ /dynamic-workers/examples/ 301
19+
/dynamic-workers/examples/running-ai-generated-code/ /dynamic-workers/examples/ 301
1920

2021
# changelog
2122
/changelog/rss.xml /changelog/rss/index.xml 301

src/content/docs/dynamic-workers/examples/agents-executing-code.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Codemode
33
description: Read the Codemode reference in Cloudflare Agents docs.
4-
pcx_content_type: navigation
5-
external_link: /agents/api-reference/codemode/
4+
pcx_content_type: example
5+
external_link: https://github.com/cloudflare/agents/tree/main/examples/codemode
66
sidebar:
7-
order: 2
7+
order: 3
88
---

src/content/docs/dynamic-workers/examples/dynamic-workers-playground.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Dynamic Workers Playground
33
description: Explore a playground built with Dynamic Workers.
44
pcx_content_type: example
5+
external_link: https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers-playground
56
sidebar:
6-
order: 1
7+
order: 2
78
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Dynamic Workers Starter
3+
description: A starter template for building with Dynamic Workers.
4+
pcx_content_type: example
5+
external_link: https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers-starter
6+
sidebar:
7+
order: 1
8+
---

src/content/docs/dynamic-workers/examples/running-ai-generated-code.mdx

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/content/docs/dynamic-workers/getting-started.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar:
88

99
import { WranglerConfig, TypeScriptExample } from "~/components";
1010

11-
Worker Loader lets a Worker create and run other Workers at runtime. Each Dynamic Worker runs in its own isolated sandbox. You provide the code, choose which bindings the Dynamic Worker can access, and control whether the Dynamic Worker can reach the network.
11+
You can create a Worker that spins up other Workers, called Dynamic Workers, at runtime to execute code on-demand in a secure, sandboxed environment. You provide the code, choose which bindings the Dynamic Worker can access, and control whether the Dynamic Worker can reach the network.
1212

1313
Dynamic Workers support two loading modes:
1414

@@ -19,9 +19,17 @@ Dynamic Workers support two loading modes:
1919

2020
### Try it out
2121

22-
Deploy the Dynamic Workers Playground to get automatically set up with a Worker that bundles and executes Dynamic Workers. Import GitHub repos and deploy them as Dynamic Workers, with real-time logs and observability.
22+
#### Dynamic Workers Starter
2323

24-
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/dinasaur404/dynamic-workers-playground)
24+
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers-starter)
25+
26+
Use this "hello world" starter to get a Worker deployed that can load and execute Dynamic Workers.
27+
28+
#### Dynamic Workers Playground
29+
30+
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/agents/tree/main/examples/dynamic-workers-playground)
31+
32+
You can also deploy the Dynamic Workers Playground, where you can write or import code, bundle it at runtime with `@cloudflare/worker-bundler`, execute it through a Dynamic Worker, and see real-time responses and execution logs.
2533

2634
## Configure Worker Loader
2735

0 commit comments

Comments
 (0)