Skip to content

Add Cloudflare Workflows integration guide for Agents#26784

Closed
agents-git-bot[bot] wants to merge 1 commit into
productionfrom
sync-docs-pr-683
Closed

Add Cloudflare Workflows integration guide for Agents#26784
agents-git-bot[bot] wants to merge 1 commit into
productionfrom
sync-docs-pr-683

Conversation

@agents-git-bot

@agents-git-bot agents-git-bot Bot commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR adds comprehensive documentation for integrating Cloudflare Workflows with the Agents SDK, syncing changes from cloudflare/agents PR #683 (add task management and workflow integration).

Changes

  • New guide: agents/guides/workflows-integration.mdx - Complete how-to guide demonstrating Cloudflare Workflows integration with Agents SDK
  • Updated: agents/concepts/workflows.mdx - Added Cloudflare Workflows integration section with cross-references

What this guide covers

The new guide demonstrates how to:

  • Integrate Cloudflare Workflows with Agents for durable, long-running tasks
  • Implement step-based checkpointing with automatic retries
  • Use step.sleep() for hibernation (hours/days with zero compute cost)
  • Implement human-in-the-loop approval with step.waitForEvent()
  • Handle RPC communication between Workflows and Agents
  • Choose between ctx.waitUntil() and Cloudflare Workflows based on use case

Key features demonstrated

  1. Quick Analysis - Using ctx.waitUntil() for sub-30s tasks in Durable Objects
  2. Deep Analysis - Using Cloudflare Workflows for durable execution with:
    • Automatic retries with exponential backoff
    • Durable steps that checkpoint progress
    • Human approval gates that can wait days
    • Scheduled follow-up tasks
    • Real-time progress updates via RPC

Related

🤖 Generated with Claude Code

@agents-git-bot
agents-git-bot Bot requested a review from a team November 27, 2025 15:13
@github-actions github-actions Bot added the product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. label Nov 27, 2025
@github-actions

github-actions Bot commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/agents/ @irvinebroque, @rita3ko, @elithrar, @thomasgauvin, @threepointone, @whoiskatrin, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

@agents-git-bot agents-git-bot Bot changed the title Add task management system documentation (sync from agents PR #683) Sync docs for PR #683: add task management and workflow integration Dec 14, 2025
@agents-git-bot agents-git-bot Bot changed the title Sync docs for PR #683: add task management and workflow integration Add task management system documentation (sync from agents PR #683) Dec 14, 2025
@agents-git-bot
agents-git-bot Bot force-pushed the sync-docs-pr-683 branch 2 times, most recently from c6836a4 to 4e3cb5c Compare December 14, 2025 16:57
@agents-git-bot agents-git-bot Bot changed the title Add task management system documentation (sync from agents PR #683) Add task management and workflow integration (sync from agents PR #683) Dec 14, 2025
@agents-git-bot

Copy link
Copy Markdown
Contributor Author

Documentation Updates Added

I have enhanced the documentation sync with the following improvements:

New Files

  • src/content/docs/agents/concepts/tasks.mdx - Complete Tasks concept documentation covering:

    • TaskContext API (emit, setProgress, signal)
    • Task management methods
    • Client updates via WebSocket
    • Task lifecycle states
    • Links to durable tasks
  • src/content/docs/agents/guides/task-runner.mdx - Comprehensive step-by-step guide including:

    • Complete setup instructions
    • Quick tasks vs durable tasks comparison
    • Working code examples for both Agent and Workflow
    • React client implementation
    • Real-time updates explanation

Enhanced Files

  • src/content/docs/agents/concepts/durable-tasks.mdx - Added:
    • Important note about retry semantics (entire method wrapped in single workflow step)
    • Expanded "When to use durable tasks" with AgentWorkflow guidance
    • Better distinction between three task patterns: @task(), @task({ durable: true }), and AgentWorkflow

All documentation follows Cloudflare Style Guide requirements:
✅ Uses TypeScriptExample component for code blocks
✅ Uses WranglerConfig component for configuration
✅ Uses PackageManagers component for install commands
✅ Proper use of admonitions (:::note)
✅ Full relative links with trailing slashes
✅ No contractions or exclamation marks

🤖 Generated with Claude Code

@agents-git-bot
agents-git-bot Bot requested review from a team, celso, jonesphillip and mia303 as code owners December 29, 2025 16:46
@agents-git-bot agents-git-bot Bot changed the title Add task management and workflow integration (sync from agents PR #683) Add documentation for task management and workflow integration Dec 29, 2025
@agents-git-bot agents-git-bot Bot changed the title Add documentation for task management and workflow integration Sync docs for PR #683: add task management and workflow integration Dec 29, 2025
- Add comprehensive guide for integrating Cloudflare Workflows with Agents SDK
- Demonstrate durable execution, human-in-the-loop approval, and scheduled tasks
- Include complete working examples with TypeScript code
- Update workflows concept doc with integration overview and cross-references
- Document when to use ctx.waitUntil() vs Cloudflare Workflows

Related to cloudflare/agents PR #683 (add task management and workflow integration)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@agents-git-bot agents-git-bot Bot changed the title Sync docs for PR #683: add task management and workflow integration Add Cloudflare Workflows integration guide for Agents Jan 1, 2026
@github-actions
github-actions Bot deleted the sync-docs-pr-683 branch March 19, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:agents Build and deploy AI-powered Agents on Cloudflare that can act autonomously. size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants