Quick Navigation
| File | Title | Description |
|---|---|---|
| Step-Workflows-Overview | Overview | What Step Workflows are, when to use them, core concepts |
| Steps-Reference | Reference | Complete technical reference for all configuration options |
| Tutorial-Overview | Tutorial Overview | Introduction to the hands-on tutorial series |
| Example-01-Hello-World | Example 1 | Hello World — basic workflow structure |
| Example-02-Collect-Input | Example 2 | Collect Input — input parameters and validation |
| Example-03-Multi-Step | Example 3 | Multi-Step Flow — transitions and data persistence |
| Example-04-Lifecycle | Example 4 | Lifecycle Actions — on.enter, say, counters |
| Example-05-Conditional | Example 5 | Conditional Branching — JMESPath, routing |
| Example-06-Retry | Example 6 | Retry Loop — validation, loop-back transitions |
| Example-07-Integration | Example 7 | Tool 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
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.*)
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
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
nextfield) - Workflow initialization
- State changes after submission
tutorial hello-world basic terminal-step submit-tool initialization
05 — Example 2: Collect Input
Adding input parameters with automatic validation. Topics covered:- Defining
inputsarray withname,type,description,required - Dynamic tool schema generation from inputs
- Automatic validation of required fields
- Accessing inputs via
inputs.* - Input accumulation across submissions
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
nextfield - The
saveaction for persisting data across steps - Transitional vs terminal steps
- Dynamic tool schema changes per step
- State evolution through the workflow
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.enterhook for step initializationon.submithook for post-validation actionssayaction for verbatim text deliverysetaction for initializing variablesincaction for counters- Using
enumto constrain input values - Combining multiple actions in hooks
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
nextentries withifconditions - JMESPath expression syntax
- Logical operators (
||,&&,!) - Evaluation order (first match wins)
- Fallback routes (no condition)
- Multiple terminal steps for different paths
- Variable access in conditions
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.presubmitfor 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
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:callaction for invoking external tools- Template variables in
callarguments tools.allowfor restricting tool visibility per steptools.callfor forcing tool execution- Progressive tool disclosure pattern
- Integration with validation APIs and CRM systems
- Best practices for tool integration
tutorial integration call-action external-tools tools-allow tools-call progressive-disclosure api crm security
Keyword Index
Find topics by keyword. Format:keyword → file(s)
Reading Paths
New to Step Workflows?
Start here:- 01 — Overview — Understand the concept
- 03 — Tutorial Overview — See what you’ll build
- 04 — Example 1 → … → 10 — Example 7 — Build progressively
Need to implement a specific feature?
| If you need to… | Read… |
|---|---|
| Collect user data | 05 — Collect Input |
| Chain multiple steps | 06 — Multi-Step |
| Add welcome messages | 07 — Lifecycle |
| Route based on input | 08 — Conditional |
| Validate with retries | 09 — Retry |
| Call external APIs | 10 — Integration |

