Documentation

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:

CategoryStepsDescription
Core ActionsPrompt Call, Text, Transform, Gate, Combinator, Join, Extract Content, Insight, Retry, Evaluate StepThe fundamental building blocks: call LLMs, compose text, branch, merge, extract, and retry
Content ActionsRetrieval, Write Metadata, Write/Load Content Attachment, Load Content, Publish ContentRead, enrich, and publish knowledge base content
MemoryWrite Memory, Search Memory, Load MemoryPersistent agent memory across runs
IntegrationWebhook Call, Web Fetch, Web Search, Write to S3, Send Email, Call AgentConnect to external systems, APIs, and other agents
OutputDisplay Result, Streaming ResultDeliver the final result to users

Common Fields

Every step type shares these base fields:

FieldTypeRequiredDescription
step_typeenumYesThe type of step (see sections below)
idstringAutoA 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}}.
namestringNoA human-readable label for the step, shown in the UI
purposestringNoA 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.

FieldTypeDefaultDescription
stepsarray[]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

VariableDescription
{{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.

VariableFormat / BehaviorExample Output
{{date UTC}}YYYY-MM-DD2026-02-17
{{date America/New_York}}YYYY-MM-DD2026-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:SS14:30:00
{{time America/New_York}}HH:MM:SS09:30:00
{{datetime UTC}}YYYY-MM-DD HH:MM:SS2026-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

OperatorDescriptionExample
$eqEquals{"category": {"$eq": "news"}}
$neNot equals{"status": {"$ne": "draft"}}
$ltLess than{"score": {"$lt": 0.5}}
$lteLess than or equal{"priority": {"$lte": 3}}
$gtGreater than{"word_count": {"$gt": 100}}
$gteGreater than or equal{"published_date": {"$gte": "2026-01-01"}}
$inValue in list{"category": {"$in": ["news", "blog"]}}
$ninValue not in list{"status": {"$nin": ["draft", "archived"]}}
$existsField exists{"author": {"$exists": true}}
$regexMatches regex{"title": {"$regex": "^Breaking"}}
$notNegation{"status": {"$not": {"$eq": "draft"}}}

Logical Operators

OperatorDescription
$andAll conditions must match
$orAt 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:

  1. Root steps execute first, in order
  2. Child steps execute after their parent completes, receiving the parent's output as input
  3. Join steps signal completion to their target combinator
  4. Combinator steps wait for all connected join steps before executing
  5. A step only executes after all its dependencies have completed
TriggerSummarizeprompt callExtract Entitiesprompt callJoinCombinatormerge resultsDisplay Result
Figure 1.DAG execution with parallel branches: two processing paths run independently, join steps signal completion, and the combinator waits for all joins before merging results.

Step Caching

The Prompt Call and Retrieval steps support result caching to reduce costs and improve performance:

FieldDescription
extended_caching_daysCache results for N days. Identical inputs return cached results.
cache_all_minutesCache 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 TypeWhat the AI Assistant Generates
Prompt CallModel, prompts, temperature, tools, JSON template, formatting — full prompt call configuration
RetrievalKnowledge base, query, filters, reranker, time range, content type — full retrieval configuration
TransformRegex patterns, substitutions, and comments for each rule
GateConditions with targets, operators, values, match mode, and on_match
CombinatorOutput template with step references, and content type
TextTemplate with substitution variables, and content type
Call AgentTarget agent, pass-through settings for input/metadata, and content version
Write MemoryKey, speaker, content, and metadata — full write memory configuration
Search MemoryKey, query, filters, time range, top_n — full search memory configuration
Load MemoryKey, order, limit, and content type — full load memory configuration
InsightPrompt, output format, output schema, model, temperature, max tokens — full insight configuration
Write MetadataMetadata key, content, and content version — full write metadata configuration
Write AttachmentAttachment key, content type, content, indexed flag, and content version
Load AttachmentAttachment key and content version
Load ContentContent version selection
Publish ContentTarget 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