@@ -85,39 +85,3 @@ Workflows are automatically tracked in `cf_agents_workflows` SQLite table:
8585- Params/output NOT stored by default (could be large)
8686
8787See ` docs / workflows .md ` for full documentation.
88-
89- ## PR Reviewer Note
90-
91- ## How to Review This PR
92-
93- ### Recommended reading order:
94-
95- 1. ** ` docs / workflows .md ` ** - Start here for the complete picture. Covers:
96- - Why integrate Workflows with Agents
97- - Quick start guide
98- - Full API reference
99- - Common patterns (background processing, approval flows, retry logic)
100-
101- 2. ** ` packages / agents / src / workflow - types .ts ` ** - All type definitions:
102- - ` AgentWorkflowParams ` - Combined user + internal params
103- - ` WorkflowCallback ` types (progress, complete, error, event)
104- - ` WorkflowInfo ` - Parsed workflow tracking record
105- - ` WorkflowQueryCriteria ` - For querying workflows
106-
107- 3. ** ` packages / agents / src / workflow .ts ` ** - The ` AgentWorkflow ` base class:
108- - Constructor hook that initializes ` this .agent ` before ` run ()` executes
109- - Helper methods: ` reportProgress ` , ` reportComplete ` , ` reportError ` , ` sendEvent ` , ` broadcastToClients `
110- - ` getUserParams ()` to extract user params without internal fields
111-
112- 4. ** ` packages / agents / src / index .ts ` ** - Agent class additions (search for ` cf_agents_workflows ` ):
113- - SQLite table schema and initialization
114- - ` runWorkflow ()` - Starts workflow and tracks it
115- - ` getWorkflow ()` / ` getWorkflows ()` - Query tracked workflows
116- - ` sendWorkflowEvent ()` - Send events to waiting workflows
117- - ` onWorkflowCallback ()` and ` onWorkflow * ` lifecycle methods
118- - HTTP endpoints at ` / _workflow / callback ` and ` / _workflow / broadcast `
119-
120- 5. **Tests** (in order):
121- - ` packages / agents / src / tests / test - workflow .ts ` - Example test workflows
122- - ` packages / agents / src / tests / workflow .test .ts ` - Unit tests for tracking and callbacks
123- - ` packages / agents / src / tests / workflow - integration .test .ts ` - Integration tests with introspection
0 commit comments