Skip to main content

Tutorial

A practical guide to building workflows in Graflow — from your first task to advanced patterns.

This guide teaches you how to define tasks and build workflows through practical examples.

Learning Path

Basics — Start here

  1. Your First Task@task decorator and task IDs
  2. Your First Workflow — Workflow context and execution
  3. Task Composition — Sequential (>>) and parallel (|) operators
  4. Passing Parameters — Channels and parameter binding

Core Concepts — Master the fundamentals

  1. Task Instances — Reusing tasks with different parameters
  2. Channels and Context — Inter-task communication, injection, and prompt management
  3. Execution Patterns — Getting results and controlling execution
  4. Complex Workflows — Diamond patterns and multi-instance

Advanced Topics — Dynamic control flow

  1. Dynamic Task Generation — Runtime task addition and control flow

Looking for a quick syntax reference? See the Cheatsheet.