> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syllable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Step Workflows

> Complete documentation for building multi-step AI agent workflows with progressive disclosure

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

| File                                                   | Title             | Description                                                |
| ------------------------------------------------------ | ----------------- | ---------------------------------------------------------- |
| [Step-Workflows-Overview](./overview)                  | Overview          | What Step Workflows are, when to use them, core concepts   |
| [Steps-Reference](./reference)                         | Reference         | Complete technical reference for all configuration options |
| [Tutorial-Overview](./tutorial-overview)               | Tutorial Overview | Introduction to the hands-on tutorial series               |
| [Example-01-Hello-World](./example-01-hello-world)     | Example 1         | Hello World — basic workflow structure                     |
| [Example-02-Collect-Input](./example-02-collect-input) | Example 2         | Collect Input — input parameters and validation            |
| [Example-03-Multi-Step](./example-03-multi-step)       | Example 3         | Multi-Step Flow — transitions and data persistence         |
| [Example-04-Lifecycle](./example-04-lifecycle)         | Example 4         | Lifecycle Actions — `on.enter`, `say`, counters            |
| [Example-05-Conditional](./example-05-conditional)     | Example 5         | Conditional Branching — JMESPath, routing                  |
| [Example-06-Retry](./example-06-retry)                 | Example 6         | Retry Loop — validation, loop-back transitions             |
| [Example-07-Integration](./example-07-integration)     | Example 7         | Tool Integration — external APIs, `tools.allow`            |

***

## Section Summaries

### [01 — Step Workflows Overview](./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](./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.allowGoToStep`
* **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](./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](./example-01-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](./example-02-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](./example-03-multi-step)

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](./example-04-lifecycle)

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](./example-05-conditional)

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](./example-06-retry)

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](./example-07-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: `keyword` → `file(s)`

| Keyword                    | Files                                                                                      |
| -------------------------- | ------------------------------------------------------------------------------------------ |
| **actions**                | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **api integration**        | [Tool Integration](./example-07-integration)                                               |
| **branching**              | [Conditional](./example-05-conditional)                                                    |
| **call action**            | [Reference](./reference), [Tool Integration](./example-07-integration)                     |
| **cel**                    | [Reference](./reference), [Retry](./example-06-retry)                                      |
| **conditional routing**    | [Conditional](./example-05-conditional)                                                    |
| **counters**               | [Reference](./reference), [Lifecycle](./example-04-lifecycle), [Retry](./example-06-retry) |
| **data persistence**       | [Multi-Step](./example-03-multi-step)                                                      |
| **enum**                   | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **error handling**         | [Retry](./example-06-retry)                                                                |
| **expressions**            | [Reference](./reference), [Conditional](./example-05-conditional)                          |
| **get action**             | [Reference](./reference)                                                                   |
| **global variables**       | [Reference](./reference)                                                                   |
| **inc action**             | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **inputs**                 | [Reference](./reference), [Collect Input](./example-02-collect-input)                      |
| **jmespath**               | [Reference](./reference), [Conditional](./example-05-conditional)                          |
| **lifecycle hooks**        | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **local variables**        | [Reference](./reference)                                                                   |
| **loop-back**              | [Reference](./reference), [Retry](./example-06-retry)                                      |
| **monolithic prompt**      | [Overview](./overview)                                                                     |
| **next / transitions**     | [Reference](./reference), [Multi-Step](./example-03-multi-step)                            |
| **on.enter**               | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **on.presubmit**           | [Reference](./reference), [Retry](./example-06-retry)                                      |
| **on.submit**              | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **progressive disclosure** | [Overview](./overview), [Tool Integration](./example-07-integration)                       |
| **retry**                  | [Retry](./example-06-retry)                                                                |
| **save action**            | [Reference](./reference), [Multi-Step](./example-03-multi-step)                            |
| **say action**             | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **set action**             | [Reference](./reference), [Lifecycle](./example-04-lifecycle)                              |
| **state machine**          | [Overview](./overview)                                                                     |
| **submit tool**            | [Overview](./overview), [Hello World](./example-01-hello-world)                            |
| **templates**              | [Reference](./reference)                                                                   |
| **terminal steps**         | [Overview](./overview), [Reference](./reference), [Hello World](./example-01-hello-world)  |
| **tool visibility**        | [Reference](./reference), [Tool Integration](./example-07-integration)                     |
| **tools.allow**            | [Reference](./reference), [Tool Integration](./example-07-integration)                     |
| **tools.call**             | [Reference](./reference), [Tool Integration](./example-07-integration)                     |
| **validation**             | [Collect Input](./example-02-collect-input), [Retry](./example-06-retry)                   |
| **variables**              | [Reference](./reference)                                                                   |
| **workflow state**         | [Overview](./overview), [Multi-Step](./example-03-multi-step)                              |

***

## Reading Paths

### New to Step Workflows?

Start here:

1. [01 — Overview](./overview) — Understand the concept
2. [03 — Tutorial Overview](./tutorial-overview) — See what you'll build
3. [04 — Example 1](./example-01-hello-world) → ... → [10 — Example 7](./example-07-integration) — Build progressively

### Need to implement a specific feature?

| If you need to...     | Read...                                          |
| --------------------- | ------------------------------------------------ |
| Collect user data     | [05 — Collect Input](./example-02-collect-input) |
| Chain multiple steps  | [06 — Multi-Step](./example-03-multi-step)       |
| Add welcome messages  | [07 — Lifecycle](./example-04-lifecycle)         |
| Route based on input  | [08 — Conditional](./example-05-conditional)     |
| Validate with retries | [09 — Retry](./example-06-retry)                 |
| Call external APIs    | [10 — Integration](./example-07-integration)     |

### Looking for technical details?

[02 — Reference](./reference) has complete documentation of all options.
