workflows.md

Created about 12 hours ago

attributes
source_pathreferences/workflows.md
source_sha2560cdf5b5fd935f0986c8c1b61306e8294bfe9b710ca856428cfb45296ab181aec
source_urlhttps://github.com/cloudflare/skills/blob/47dfc2ce969bf62acf8bc231198ade4bb02712e0/skills/agents-sdk/references/workflows.md
supporting_skill_id40176
upstream_revision47dfc2ce969bf62acf8bc231198ade4bb02712e0

Workflows Integration

Use Agents for interactive communication and state management. Add a Workflow when a task needs durable multi-step execution, independent retries, or waits for external approval. Choose based on recovery needs; consult Run Workflows before implementing the integration.

Read for the task

Task Documentation
Define a typed AgentWorkflow, start it from an Agent, and configure bindings Quick start
Call back into the originating Agent and understand durable versus non-durable helpers AgentWorkflow class
Send events, query instances, pause, resume, terminate, or delete tracked workflows Agent workflow methods
Receive progress, completion, errors, and custom events Lifecycle callbacks
Approve or reject a waiting task Human-in-the-loop approval
Persist Workflow results into Agent state State synchronization
Define steps, parameters, retries, and returned values Workers API

Design checks

Keep external side effects within durable steps, make retried operations idempotent, and persist the values needed after recovery through step results. Use the Rules of Workflows to choose step boundaries.

Progress reports and client broadcasts may repeat on retry. Use the documented durable step helpers for persistent Agent state changes and completion reporting; see bidirectional communication.

Children

No children yet.

Like how this is organised?

Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.