Overview
bash
Execute shell commands.Basic Command
Multiple Commands (Sequential)
Parallel Commands
Structured Arguments
Save Output to File
function
Execute utility functions via Goja JavaScript VM.Single Function
Multiple Functions
Parallel Functions
Use in Conditions
foreach
Iterate over lines in a file with parallel execution using a worker pool.Basic Loop
With Nested Variables
Bounded Concurrency
The foreach executor uses a worker pool pattern:- Workers pull items from a shared queue
- Maximum
threadsitems processed concurrently - Memory-efficient: doesn’t spawn all goroutines upfront
- Graceful cancellation on context timeout
Fields
Pre-Processing Input
Transform each input line before it is stored in the loop variable:Variable Syntax
Use[[variable]] (double brackets) for loop variables to avoid conflicts with {{templates}}:
Nested Foreach
Foreach steps can contain other foreach steps:parallel-steps
Run multiple steps concurrently.remote-bash
Execute commands in Docker or SSH without module-level runner.Docker Execution
SSH Execution
Fields
http
Make HTTP requests with automatic retries and connection pooling.Supported Methods
GET Request
POST Request
PUT Request
PATCH Request
DELETE Request
Auto-Exported Variables
After HTTP step execution, variables are exported with the pattern<step_name>_http_resp:
HTTP Features
- Connection Pooling: Reuses connections for efficiency
- Automatic Retries: Retries on network errors and 5xx responses (up to 3 attempts)
- Timeout: Configurable via step
timeoutfield (default: 30s) - Template Support: Headers and request body support
{{variable}}interpolation
llm
AI-powered processing using LLM APIs (OpenAI-compatible).Chat Completion
Message Roles
With Tool Calling
Define tools the LLM can invoke (OpenAI-compatible function calling):{{step_name_llm_resp.tool_calls}}.
Embeddings
Generate vector embeddings for text:Multimodal Content (Vision)
Include images in messages:Structured Output (JSON Schema)
Force structured JSON responses:Configuration Override
Override global LLM settings per step:Auto-Exported Variables
After LLM step execution:Provider Rotation
If multiple LLM providers are configured, the executor automatically:- Rotates to next provider on rate limits or errors
- Retries up to
max_retries * provider_counttimes - Records rate limit metrics for monitoring
agent
Agentic LLM execution with an autonomous tool-calling loop. The agent receives a task, plans its approach, calls tools iteratively, and produces a final answer.Basic Usage
Preset Tools
The following preset tools are available via thepreset field:
Custom Tool Handlers
Define custom tools with a handler expression:Multi-Goal Queries
Usequeries for multiple goals evaluated in sequence:
Sub-Agents
Spawn specialized sub-agents from the main agent:spawn_agent tool.
Memory Configuration
Control conversation memory for long-running agents:Planning Stage
Run a planning prompt before the main execution loop:Structured Output
Enforce a JSON schema on the agent’s final output:Model Selection
Specify preferred models (tried in order before falling back to default):Tool Tracing Hooks
Add JavaScript hooks for tool call monitoring:Stop Condition
Evaluate a JS expression after each iteration to stop early:Parallel Tool Calls
Control whether the agent can execute multiple tool calls in parallel (enabled by default):Auto-Exported Variables
After agent step execution, these variables are automatically available:Fields Reference
* Either
query or queries is required.
Common Step Fields
All steps support these fields:Field Reference
Next Steps
- Variables - Exports and propagation
- Control Flow - Conditions and routing
- Functions Reference - Available functions
