Agent Steps
Steps are the building blocks of an agent workflow. Each agent contains an ordered list of steps that execute sequentially — the output of one step becomes the input to the next. Steps can also reference outputs from any earlier step using substitution variables.
Step Types
Agent steps are organized into five categories, matching the step selector in the editor:
| Category | Steps | Description |
|---|---|---|
| Core Actions | Prompt Call, Text, Transform, Gate, Combinator, Join, Extract Content, Insight, Retry, Evaluate Step | The fundamental building blocks: call LLMs, compose text, branch, merge, extract, and retry |
| Content Actions | Retrieval, Write Metadata, Write/Load Content Attachment, Load Content, Publish Content | Read, enrich, and publish knowledge base content |
| Memory | Write Memory, Search Memory, Load Memory | Persistent agent memory across runs |
| Integration | Webhook Call, Web Fetch, Web Search, Write to S3, Send Email, Call Agent | Connect to external systems, APIs, and other agents |
| Output | Display Result, Streaming Result | Deliver the final result to users |
Common Fields
Every step type shares these base fields:
| Field | Type | Required | Description |
|---|---|---|---|
step_type | enum | Yes | The type of step (see sections below) |
id | string | Auto | A unique identifier for the step. Must match ^[a-zA-Z0-9_-]+$. Auto-generated if not provided. Used to reference this step's output from other steps via {{step.id.output}}. |
name | string | No | A human-readable label for the step, shown in the UI |
purpose | string | No | A description of what this step does. Used by the AI assistant to understand context. |
Child Steps (Composite Steps)
Most step types are composite — they can contain nested child steps. Child steps execute after their parent and receive the parent's output as input.
| Field | Type | Default | Description |
|---|---|---|---|
steps | array | [] | Ordered list of child steps to execute after this step |
The following step types support child steps: Prompt Call, Retrieval, Transform, Extract Content, Gate, Combinator, Text, Web Fetch, Web Search, Write Metadata, Write Content Attachment, Load Content Attachment, Load Content, Publish Content, Write Memory, Search Memory, Load Memory.
The following step types do not support child steps: Display Result, Join, Retry, Evaluate Step.
String Substitutions
Most step fields support dynamic variable substitution using {{placeholder}} syntax. This lets steps reference agent input, other steps' outputs, metadata, and runtime values.
Available Variables
| Variable | Description |
|---|---|
{{input}} | The current step's input (output of the previous step, or agent input for the first step) |
{{agent.input}} | The original agent input (always the initial input, regardless of step position) |
{{agent.name}} | The agent's name |
{{agent.id}} | The agent's unique ID |
{{agent.run_id}} | The current run's unique ID |
{{agent_step.id}} | The current step's ID |
{{agent_step.name}} | The current step's name |
{{step.<step_id>.output}} | Output from a previous step with the given ID |
{{step.<step_id>.input}} | Input to a previous step with the given ID |
{{metadata.<field>}} | A metadata field value from the trigger |
{{knowledge_base.name}} | Knowledge base name (in retrieval context) |
{{knowledge_base.description}} | Knowledge base description (in retrieval context) |
{{organization.name}} | Organization name (falls back to user name) |
{{organization.description}} | Organization description |
{{user.name}} | Name of the user who initiated the run |
Date & Time Variables
Date and time variables accept an IANA timezone and an optional locale code. Currently, the locale code selects the format pattern (for example, ordering and separators), but month and day names are rendered in English by the backend implementation.
| Variable | Format / Behavior | Example Output |
|---|---|---|
{{date UTC}} | YYYY-MM-DD | 2026-02-17 |
{{date America/New_York}} | YYYY-MM-DD | 2026-02-17 |
{{date Europe/London en}} | Locale-specific date pattern (English month/day names) | February 17, 2026 |
{{date Asia/Tokyo ja}} | Locale-specific date pattern (English month/day names) | February 17, 2026 |
{{time UTC}} | HH:MM:SS | 14:30:00 |
{{time America/New_York}} | HH:MM:SS | 09:30:00 |
{{datetime UTC}} | YYYY-MM-DD HH:MM:SS | 2026-02-17 14:30:00 |
{{datetime Europe/Paris fr}} | Locale-specific datetime pattern (English month/day names) | February 17, 2026 03:30:00 PM |
Function-style syntax is also supported: {{datetime(UTC)}} or {{datetime(UTC, es)}}. As with the inline syntax, the locale argument currently affects only the pattern, not the language of month or day names.
Unrecognized placeholders are left unchanged in the output, making it safe to include template syntax that should not be resolved.
Metadata Filters
The Retrieval step supports MongoDB-style metadata filters to narrow results based on document metadata fields. Any step that accepts a filter field uses this same syntax.
Filter Operators
| Operator | Description | Example |
|---|---|---|
$eq | Equals | {"category": {"$eq": "news"}} |
$ne | Not equals | {"status": {"$ne": "draft"}} |
$lt | Less than | {"score": {"$lt": 0.5}} |
$lte | Less than or equal | {"priority": {"$lte": 3}} |
$gt | Greater than | {"word_count": {"$gt": 100}} |
$gte | Greater than or equal | {"published_date": {"$gte": "2026-01-01"}} |
$in | Value in list | {"category": {"$in": ["news", "blog"]}} |
$nin | Value not in list | {"status": {"$nin": ["draft", "archived"]}} |
$exists | Field exists | {"author": {"$exists": true}} |
$regex | Matches regex | {"title": {"$regex": "^Breaking"}} |
$not | Negation | {"status": {"$not": {"$eq": "draft"}}} |
Logical Operators
| Operator | Description |
|---|---|
$and | All conditions must match |
$or | At least one condition must match |
Filter Examples
Simple field match (implicit AND):
{
"category": { "$eq": "technology" },
"status": { "$ne": "draft" }
}
Using $or:
{
"$or": [
{ "category": { "$eq": "technology" } },
{ "category": { "$eq": "science" } }
]
}
Complex nested filter:
{
"$and": [
{ "published_date": { "$gte": "2026-01-01" } },
{
"$or": [
{ "category": { "$in": ["news", "analysis"] } },
{ "priority": { "$gt": 5 } }
]
},
{ "author": { "$exists": true } }
]
}
With substitution variables:
{
"category": { "$eq": "{{metadata.category}}" },
"published_date": { "$gte": "{{metadata.start_date}}" }
}
Step Execution Order
Steps execute as a directed acyclic graph (DAG). In the simplest case, steps run sequentially top-to-bottom. With child steps and parallel branches (via join/combinator), the execution order follows these rules:
- Root steps execute first, in order
- Child steps execute after their parent completes, receiving the parent's output as input
- Join steps signal completion to their target combinator
- Combinator steps wait for all connected join steps before executing
- A step only executes after all its dependencies have completed
Step Caching
The Prompt Call and Retrieval steps support result caching to reduce costs and improve performance:
| Field | Description |
|---|---|
extended_caching_days | Cache results for N days. Identical inputs return cached results. |
cache_all_minutes | Cache ALL requests (regardless of input) for N minutes (1–60). Useful for time-insensitive batch operations. |
Caching is particularly useful for:
- Retrieval steps that run on the same knowledge base frequently
- Prompt calls with deterministic outputs (e.g., classification tasks with
temperature: 0) - Reducing credit usage for repeated operations
AI Assistant
The AI assistant helps you configure steps by generating configurations from natural language descriptions. It understands your full agent workflow — including all steps and their relationships — and can suggest appropriate values.
Supported step types:
| Step Type | What the AI Assistant Generates |
|---|---|
| Prompt Call | Model, prompts, temperature, tools, JSON template, formatting — full prompt call configuration |
| Retrieval | Knowledge base, query, filters, reranker, time range, content type — full retrieval configuration |
| Transform | Regex patterns, substitutions, and comments for each rule |
| Gate | Conditions with targets, operators, values, match mode, and on_match |
| Combinator | Output template with step references, and content type |
| Text | Template with substitution variables, and content type |
| Call Agent | Target agent, pass-through settings for input/metadata, and content version |
| Write Memory | Key, speaker, content, and metadata — full write memory configuration |
| Search Memory | Key, query, filters, time range, top_n — full search memory configuration |
| Load Memory | Key, order, limit, and content type — full load memory configuration |
| Insight | Prompt, output format, output schema, model, temperature, max tokens — full insight configuration |
| Write Metadata | Metadata key, content, and content version — full write metadata configuration |
| Write Attachment | Attachment key, content type, content, indexed flag, and content version |
| Load Attachment | Attachment key and content version |
| Load Content | Content version selection |
| Publish Content | Target source, identifier mode, content type, title, content, metadata, suppress triggers |
To use the AI assistant, open a supported step and click the AI Assistant button. Describe what you want in natural language, and the assistant will generate or refine the configuration.
Next Steps
- Agent Triggers — Configure when and how agents run
- Agents Overview — Back to the agents overview
- Knowledge Bases — Connect data sources for retrieval steps
- Content Sources — Understand how content flows into knowledge bases
- Memory Banks — Create and manage persistent memory for your agents
- API Examples — Code samples for working with agents