Skip to content

Commit 08a73b3

Browse files
committed
Remove <Steps> tags and normalize code blocks
Remove custom <Steps> wrapper tags around example sections and replace step lists with plain headings (e.g., "Create src/workflow.ts", "Create src/agent.ts", "Replace src/index.ts"). Normalize fenced code block indentation and clean up surrounding whitespace for more consistent MDX rendering.
1 parent 633f81e commit 08a73b3

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

src/content/docs/workflows/get-started/durable-agents.mdx

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ The `AgentWorkflow` class from the Agents SDK extends Cloudflare Workflows with
219219

220220
For a gentler introduction, refer to [Build your first Workflow](/workflows/get-started/guide/).
221221

222-
<Steps>
223-
1. Create `src/workflow.ts`:
222+
Create `src/workflow.ts`:
224223

225224
```ts title="src/workflow.ts"
226225
import { AgentWorkflow } from "agents/workflows";
@@ -333,8 +332,6 @@ export class ResearchWorkflow extends AgentWorkflow<ResearchAgent, Params> {
333332
}
334333
```
335334

336-
</Steps>
337-
338335
<Details header="Why separate steps for LLM and tools?">
339336

340337
Each `step.do()` creates a checkpoint. If your Workflow crashes or the Worker restarts:
@@ -354,8 +351,7 @@ This is especially important for:
354351

355352
The Agent handles HTTP requests, WebSocket connections, and Workflow lifecycle events. It triggers a workflow instance `runWorkflow()` and receives progress updates via callbacks.
356353

357-
<Steps>
358-
1. Create `src/agent.ts`:
354+
Create `src/agent.ts`:
359355

360356
```ts title="src/agent.ts"
361357
import { Agent } from "agents";
@@ -416,8 +412,6 @@ export class ResearchAgent extends Agent<Env, State> {
416412
}
417413
```
418414

419-
</Steps>
420-
421415
## 5. Configure your project
422416

423417
<Steps>
@@ -475,8 +469,7 @@ export class ResearchAgent extends Agent<Env, State> {
475469

476470
The Worker routes requests to the Agent, which manages workflow lifecycle. Use `routeAgentRequest()` for WebSocket connections and `getAgentByName()` for server-side RPC calls.
477471

478-
<Steps>
479-
1. Replace `src/index.ts`:
472+
Replace `src/index.ts`:
480473

481474
```ts title="src/index.ts"
482475
import { getAgentByName, routeAgentRequest } from "agents";
@@ -532,16 +525,15 @@ export default {
532525
} satisfies ExportedHandler<Env>;
533526
```
534527

535-
</Steps>
536-
537528
## 7. Develop locally
538529

539530
<Steps>
531+
540532
1. Create a [`.env` file](/workers/wrangler/environments/#secrets-in-local-development) for local development:
541533

542-
```sh title=".env"
543-
ANTHROPIC_API_KEY=your-api-key-here
544-
```
534+
```sh title=".env"
535+
ANTHROPIC_API_KEY=your-api-key-here
536+
```
545537

546538
2. Start the dev server:
547539

@@ -574,11 +566,12 @@ The agent will search for repositories, fetch details, and return a comparison.
574566
## 8. Deploy
575567

576568
<Steps>
569+
577570
1. Deploy the Worker:
578571

579-
```sh
580-
npx wrangler deploy
581-
```
572+
```sh
573+
npx wrangler deploy
574+
```
582575

583576
2. Add your API key as a secret:
584577

0 commit comments

Comments
 (0)