Step
The most common node. Sends a prompt to an agent and produces structured output.Step Properties
| Property | Type | Required | Description |
|---|---|---|---|
id | string | yes | Unique identifier within the workflow |
agent | string | no | Name of a declared agent (required for prompt: steps) |
prompt | string | no | The prompt sent to the agent. Supports {interpolation} |
run | typescript | no | Inline TypeScript code block (alternative to prompt) |
handler | string | no | Path to a TypeScript handler function |
output | schema | yes | Output shape — inline or imported |
needs | string[] | no | Explicit dependency on other step ids |
retry | object | no | Retry policy |
timeout | string | no | Timeout duration (e.g. "30s", "5m") |
cache | object | no | Cache policy |
skipIf | string | no | Condition expression to skip the step |
Retry Policy
Timeout
Sequence
Steps are sequential by default. Use an explicitsequence node when you need to group steps inside a parallel block:
Parallel
Execute steps concurrently:Concurrency Limit
Loop
Repeat steps until a condition is met:Loop Properties
| Property | Type | Required | Description |
|---|---|---|---|
id | string | no | Loop identifier |
maxIterations | number | no | Maximum iterations (default: 5) |
until | string | yes | Stop condition expression |
onMaxReached | "fail" | "return-last" | no | Behavior at max iterations (default: "return-last") |
children | nodes | yes | Steps to repeat |
Approval
Suspend execution for human review:Approval Properties
| Property | Type | Required | Description |
|---|---|---|---|
id | string | yes | Gate identifier |
needs | string[] | no | Dependencies |
request | object | yes | Title and summary for the reviewer |
onDeny | "fail" | "continue" | "skip" | no | Denial behavior (default: "fail") |
Branch
Choose between paths based on a condition:Worktree
Execute steps in an isolated JJ worktree:Nesting
Node kinds can be nested freely:Next Steps
- Components — Extract reusable node groups.
- Prompts — Interpolation syntax for prompts.
- Inline Code — Use TypeScript inside steps.