AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

agents-sdk

Build, debug, or review Cloudflare Agents SDK applications using the agents package.

Original source
cloudflare
License
Apache-2.0
Pinned revision
e44f580f9c4fa3bf268e284ae7706c7954ba31fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read cloudflare--agents-sdk at revision e44f580f9c4fa3bf268e284ae7706c7954ba31fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 21

references/workflows.md

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.