Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7d26e18
add a changelog
whoiskatrin Jan 28, 2026
c13b39c
docs: add detailed documentation for Agents and Workflows integration…
whoiskatrin Jan 29, 2026
0addc18
docs: update example for workflow migration in run-workflows document…
whoiskatrin Jan 29, 2026
cc7e753
docs: remove unnecessary TypeScript example for DefaultProgress type …
whoiskatrin Jan 29, 2026
533c0fc
Update src/content/changelog/agents/2026-01-29-agents-workflows-integ…
whoiskatrin Jan 29, 2026
395a8d5
Update src/content/changelog/agents/2026-01-29-agents-workflows-integ…
whoiskatrin Jan 29, 2026
aec568d
Update src/content/changelog/agents/2026-01-29-agents-workflows-integ…
whoiskatrin Jan 29, 2026
f396945
Update src/content/changelog/agents/2026-01-29-agents-workflows-integ…
whoiskatrin Jan 29, 2026
33a6f68
Update src/content/changelog/agents/2026-01-29-agents-workflows-integ…
whoiskatrin Jan 29, 2026
38c9279
Update changelog title and fix workflows concept wording
whoiskatrin Jan 29, 2026
cc44ad4
Update src/content/docs/agents/api-reference/run-workflows.mdx
whoiskatrin Jan 29, 2026
921cab6
Update src/content/docs/agents/api-reference/run-workflows.mdx
whoiskatrin Jan 29, 2026
32abb8a
Update src/content/docs/agents/api-reference/run-workflows.mdx
whoiskatrin Jan 29, 2026
c989ade
Update src/content/docs/agents/api-reference/run-workflows.mdx
whoiskatrin Jan 29, 2026
77ffe16
Update src/content/docs/agents/api-reference/run-workflows.mdx
whoiskatrin Jan 29, 2026
f4102dc
Fix workflowId to instanceId in changelog example
whoiskatrin Jan 29, 2026
9a65887
Agents: Workflows integration and features
threepointone Feb 3, 2026
fbfddaa
Merge branch 'production' into update-workflows-docs
threepointone Feb 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Agents x Workflows - Build durable background agents with real time updates
description: The Agents SDK now has first-class support for Cloudflare Workflows, enabling durable multi-step background processing with automatic tracking and bidirectional communication.
products:
- agents
- workflows
date: 2026-01-30
---

import { TypeScriptExample } from "~/components";

The Agents SDK now has first-class support for [Cloudflare Workflows](/workflows/), allowing you to kick off durable, long-running async tasks from your Agent. Track workflow progress, sync state back to your Agent, and implement human-in-the-loop approval flows—all with automatic tracking in SQLite.

Use the new `AgentWorkflow` class to define workflows with typed access to your Agent:

<TypeScriptExample>

```ts
import { AgentWorkflow } from "agents";
import type { AgentWorkflowEvent, AgentWorkflowStep } from "agents";

export class ProcessingWorkflow extends AgentWorkflow<MyAgent, TaskParams> {
async run(event: AgentWorkflowEvent<TaskParams>, step: AgentWorkflowStep) {
// Report progress to Agent
await this.reportProgress({ step: "process", percent: 0.5 });

// Call Agent methods via RPC
await this.agent.updateStatus(event.payload.taskId, "processing");

const result = await step.do("process", async () => {
return processData(event.payload.data);
});

await step.reportComplete(result);
return result;
}
}
```

</TypeScriptExample>

Start workflows from your Agent with `runWorkflow()` and handle lifecycle events:

<TypeScriptExample>

```ts
export class MyAgent extends Agent {
async startTask(taskId: string, data: string) {
// Automatically tracked in Agent database
const instanceId = await this.runWorkflow("PROCESSING_WORKFLOW", {
taskId,
data,
});
return { instanceId };
}

async onWorkflowProgress(
workflowName: string,
instanceId: string,
progress: unknown,
) {
this.broadcast(JSON.stringify({ type: "progress", progress }));
}

async onWorkflowComplete(
workflowName: string,
instanceId: string,
result?: unknown,
) {
console.log(`Workflow ${workflowId} completed`);
}
}
```

</TypeScriptExample>

Key capabilities:

- **Automatic tracking** in the Agent SQLite database
- **Progress reporting** with typed progress objects
- **Bidirectional communication** between Agents and Workflows via RPC
- **State synchronization** from Workflows back to Agents (broadcasts to clients)
- **Human-in-the-loop** with `waitForApproval()` and `approveWorkflow()`/`rejectWorkflow()`

For the complete API reference and patterns, see [Run Workflows](/agents/api-reference/run-workflows/).
Loading
Loading