Skip to main content
This example demonstrates Workflows 2.0 using a single custom execution function instead of discrete steps. This pattern gives you complete control over the orchestration logic while still benefiting from workflow features like storage, streaming, and session management. When to use: When you need maximum flexibility and control over the execution flow, similar to Workflows 1.0 approach but with a better structured approach.
function_instead_of_steps.py
This was a synchronous non-streaming example of this pattern. To checkout async and streaming versions, see the cookbooks-