Skip to main content
This index provides a map of the Step Workflows documentation, helping you quickly find topics and understand what’s covered in each file.

Quick Navigation

FileTitleDescription
Step-Workflows-OverviewOverviewWhat Step Workflows are, when to use them, core concepts
Steps-ReferenceReferenceComplete technical reference for all configuration options
Tutorial-OverviewTutorial OverviewIntroduction to the hands-on tutorial series
Example-01-Hello-WorldExample 1Hello World — basic workflow structure
Example-02-Collect-InputExample 2Collect Input — input parameters and validation
Example-03-Multi-StepExample 3Multi-Step Flow — transitions and data persistence
Example-04-LifecycleExample 4Lifecycle Actions — on.enter, say, counters
Example-05-ConditionalExample 5Conditional Branching — JMESPath, routing
Example-06-RetryExample 6Retry Loop — validation, loop-back transitions
Example-07-IntegrationExample 7Tool Integration — external APIs, tools.allow

Section Summaries

01 — Step Workflows Overview

Introduction to the Step Workflows feature explaining the “progressive disclosure” pattern for AI agents. Topics covered:
  • What Step Workflows are and how they differ from monolithic prompts
  • When to use (and not use) Step Workflows
  • Basic workflow lifecycle and state machine visualization
  • Key concepts: steps, submit tool, terminal steps, state management
  • Benefits: compliance, cost reduction, maintainability, testability
  • Before/after comparison with real-world example
Tags: introduction progressive-disclosure monolithic-prompt state-machine lifecycle benefits when-to-use

02 — Step Workflow Reference

Complete technical reference documenting all configuration options. Topics covered:
  • Step Configuration: id, goal, instructions, inputs, on, next, tools
  • Lifecycle Hooks: on.enter, on.presubmit, on.submit — when triggered and allowed actions
  • Actions: say, set, inc, get, save, call — parameters and usage
  • Expressions: JMESPath (default) and CEL — syntax, gotchas, when to use which
  • Inputs Schema: parameter types, enum, format, pattern, accumulation behavior
  • Templates: {{var}} and ${var} syntax, where templates expand
  • Step Transitions: conditional next, evaluation order, terminal steps, loop-back
  • Tool Configuration: tools.allow, tools.call, tools.allow_go_to_step
  • Variables: global, task-local (local.*), step inputs (inputs.*)
Tags: reference configuration lifecycle-hooks actions say set inc get save call jmespath cel expressions inputs validation templates transitions routing tools variables scope

03 — Tutorial Overview

Introduction to the hands-on tutorial series with learning path and prerequisites. Topics covered:
  • What you’ll build (contact form workflow)
  • Prerequisites
  • Learning path summary (7 examples)
  • User journey and progressive complexity
  • Tutorial structure and estimated time
Tags: tutorial getting-started learning-path contact-form

04 — Example 1: Hello World

The simplest possible Step Workflow with a single greeting step. Topics covered:
  • Basic tool definition structure (context.task, tool)
  • Submit tool generation from tool.name
  • Terminal steps (no next field)
  • Workflow initialization
  • State changes after submission
Tags: tutorial hello-world basic terminal-step submit-tool initialization

05 — Example 2: Collect Input

Adding input parameters with automatic validation. Topics covered:
  • Defining inputs array with name, type, description, required
  • Dynamic tool schema generation from inputs
  • Automatic validation of required fields
  • Accessing inputs via inputs.*
  • Input accumulation across submissions
Tags: tutorial inputs validation required-fields dynamic-schema parameters

06 — Example 3: Multi-Step Flow

Chaining multiple steps to build a complete contact form. Topics covered:
  • Step transitions using next field
  • The save action for persisting data across steps
  • Transitional vs terminal steps
  • Dynamic tool schema changes per step
  • State evolution through the workflow
Tags: tutorial multi-step transitions save-action data-persistence workflow-state

07 — Example 4: Lifecycle Actions

Adding polish with welcome messages, progress indicators, and counters. Topics covered:
  • on.enter hook for step initialization
  • on.submit hook for post-validation actions
  • say action for verbatim text delivery
  • set action for initializing variables
  • inc action for counters
  • Using enum to constrain input values
  • Combining multiple actions in hooks
Tags: tutorial lifecycle on-enter on-submit say set inc counters enum progress-indicators

08 — Example 5: Conditional Branching

Smart routing based on user preferences. Topics covered:
  • Conditional next entries with if conditions
  • JMESPath expression syntax
  • Logical operators (||, &&, !)
  • Evaluation order (first match wins)
  • Fallback routes (no condition)
  • Multiple terminal steps for different paths
  • Variable access in conditions
Tags: tutorial branching conditional routing jmespath if-conditions fallback parallel-paths

09 — Example 6: Retry Loop

Validation with retry attempts and graceful error handling. Topics covered:
  • Validation with CEL expressions (contains())
  • on.presubmit for pre-validation logic
  • Retry counter pattern with inc
  • Loop-back transitions (step transitions to itself)
  • Conditional error messages with say
  • Maximum attempt limits
  • Graceful error handling step
Tags: tutorial retry validation cel presubmit loop-back error-handling counters max-attempts

10 — Example 7: Tool Integration

External API calls and progressive tool disclosure. Topics covered:
  • call action for invoking external tools
  • Template variables in call arguments
  • tools.allow for restricting tool visibility per step
  • tools.call for forcing tool execution
  • Progressive tool disclosure pattern
  • Integration with validation APIs and CRM systems
  • Best practices for tool integration
Tags: tutorial integration call-action external-tools tools-allow tools-call progressive-disclosure api crm security

Keyword Index

Find topics by keyword. Format: keywordfile(s)
KeywordFiles
actionsReference, Lifecycle
api integrationTool Integration
branchingConditional
call actionReference, Tool Integration
celReference, Retry
conditional routingConditional
countersReference, Lifecycle, Retry
data persistenceMulti-Step
enumReference, Lifecycle
error handlingRetry
expressionsReference, Conditional
get actionReference
global variablesReference
inc actionReference, Lifecycle
inputsReference, Collect Input
jmespathReference, Conditional
lifecycle hooksReference, Lifecycle
local variablesReference
loop-backReference, Retry
monolithic promptOverview
next / transitionsReference, Multi-Step
on.enterReference, Lifecycle
on.presubmitReference, Retry
on.submitReference, Lifecycle
progressive disclosureOverview, Tool Integration
retryRetry
save actionReference, Multi-Step
say actionReference, Lifecycle
set actionReference, Lifecycle
state machineOverview
submit toolOverview, Hello World
templatesReference
terminal stepsOverview, Reference, Hello World
tool visibilityReference, Tool Integration
tools.allowReference, Tool Integration
tools.callReference, Tool Integration
validationCollect Input, Retry
variablesReference
workflow stateOverview, Multi-Step

Reading Paths

New to Step Workflows?

Start here:
  1. 01 — Overview — Understand the concept
  2. 03 — Tutorial Overview — See what you’ll build
  3. 04 — Example 1 → … → 10 — Example 7 — Build progressively

Need to implement a specific feature?

If you need to…Read…
Collect user data05 — Collect Input
Chain multiple steps06 — Multi-Step
Add welcome messages07 — Lifecycle
Route based on input08 — Conditional
Validate with retries09 — Retry
Call external APIs10 — Integration

Looking for technical details?

02 — Reference has complete documentation of all options.