> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runtype.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runtype.com/_mcp/server.

# Flow step types overview

Build a Flow by combining steps that each perform one job. Steps can call AI models, fetch data, or branch based on logic. In the **Flow builder**, the step picker groups steps into **AI**, **Context**, **Actions**, and **Replies**. The **Starters** group adds a preset set of steps at once, such as **Simple Chatbot**, **Research Assistant**, or **Data Processor**.

Use this page to choose a step for each job in your Flow.

## AI

Use AI steps to call models and generate responses. For configuration details, see [Using prompt steps](/user-guide/flows/using-prompt-steps).

### Run Task

Send a prompt to an AI model and get a response. Set the response format to JSON when a later step needs structured data. The step runs on a Runtype platform key or on your own provider key. For more information, see [Platform keys vs. BYOK](/user-guide/getting-started/platform-keys-vs-byok).

Use **Run Task** for single prompts: text generation, summarization, classification, analysis, structured data extraction, and question answering.

### Run Agent

Run a conversational AI step with message history and tool calling. **Run Agent** uses previous messages to maintain context across turns and can call Tools.

Use **Run Agent** for multi-turn conversations, workflows that call tools, and tasks that need iterative reasoning.

## Context

Use Context steps to gather, store, and prepare data for your Flow.

### Crawl Website

Crawl a website and extract content from multiple pages. Use this step when you need information from more than one page.

Use **Crawl Website** to scrape documentation sites, pull structured content from web pages, or provide website data to AI steps.

> **Requests come from data center IP addresses**
>
> **Crawl Website** and **Fetch URL** send requests from Runtype data center IP ranges. Sites can identify these requests as automated traffic. News sites, social platforms, and e-commerce sites can block or rate-limit them. Sites behind a web application firewall (WAF) or anti-bot service can do the same. They can return a challenge page, a 403 response, or empty content. A request that works in your browser can produce a different result.
>
> When direct requests are blocked, use a Firecrawl or Massive fetch method. You can also use the `firecrawl` or `massive` built-in tools, or the **AI Search** step with **Exa Search API**. These providers retrieve content through their own infrastructure. They support rendering and anti-bot handling. You can fetch directly first, then use Firecrawl, Massive, or Exa as a fallback.

### Fetch URL

Fetch content from one URL. Choose a fetch method such as Firecrawl or Massive when you need richer scraping or content that is difficult to retrieve.

Use **Fetch URL** to read web pages, pull data from public endpoints, or fetch files and documents by URL. For configuration details, see [Using fetch-url and api-call steps](/user-guide/flows/using-fetch-url-and-api-call-steps).

### Get Record

Load one Record from the Runtype data store by ID, type, name, or filter. If several Records match, the step returns the one with the newest update. For an overview of Records, see [What are Records?](/user-guide/records/what-are-records).

Use **Get Record** to look up one customer, check a cache entry, or reference one saved item.

### List Records

Load Records that match a type, name, or filter as an array. The step orders the results from newest to oldest.

Use **List Records** when the number of matching Records can vary. For example, load a customer's tickets or a knowledge base collection.

**Get Record** and **List Records** replace the deprecated `retrieve-record` step. For more information, see [Migrate from `retrieve-record`](/user-guide/flows/using-record-steps-upsert-retrieve#migrate-from-retrieve-record).

### Upsert Record

Create a Record or update an existing Record. Use this step to save data to Runtype for later use. The data that you save must be a JSON object, not a string. To produce one, set the source step's response format to JSON. For more information, see [Using record steps](/user-guide/flows/using-record-steps-upsert-retrieve).

Use **Upsert Record** to save conversation history, cache AI results, store processed data, or build a knowledge base.

### Update Record

Modify specific fields on an existing Record without replacing the entire Record.

Use **Update Record** to update a Record's status, append metadata, or change individual fields.

### Extract Fields

Read a fixed set of named, typed values out of text and up to four images with an extraction model. Every field answers a value of its type or `null`, with a confidence and a source span.

Use **Extract Fields** when an email, form, receipt, or message holds values a Record or a branch needs. It can also compute a value that the input implies, such as a total including tax. For a decision among options you list, use a [judgment](/user-guide/flows/judgments) instead. See [Extraction](/user-guide/flows/extraction).

### AI Search

Search the web with **Exa Search API** or with a search-capable model.

Use **AI Search** to find current information, research topics, or add web data to an AI response.

### Generate Embedding

Convert text into vector embeddings with an AI model. The step returns an embedding for use in semantic search.

Use **Generate Embedding** to prepare data for similarity search or a retrieval-augmented generation (RAG) pipeline.

### Vector Search

Find similar content by comparing vector embeddings in a vector store. Choose **PostgreSQL (pgvector)**, **Weaviate**, or **Cloudflare Vectorize** as the vector store.

Use **Vector Search** for semantic search, related-document retrieval, or RAG systems. To connect Weaviate, see [Weaviate vector search](/user-guide/integrations/weaviate-vector-search).

### Store Vector

Save vector embeddings to a vector store so another step can search them later.

Use **Store Vector** to index content for a searchable embedding database or a RAG system.

### Paginate API

Fetch all pages from an API that returns paginated results. Choose cursor, offset, page-number, or link-header pagination.

Use **Paginate API** to collect complete datasets from APIs that spread results across multiple pages.

### Render Template

Render a Liquid template as HTML, email HTML, markdown, PDF, or plain text. Use **Render Template** when your data is ready and the output is a structured document.

Use **Render Template** to generate invoices, receipts, email bodies, reports, or other documents from data.

### Store Asset

Save a file to asset storage from a URL or inline base64 content. The step returns a public URL or a time-limited signed URL.

Use **Store Asset** to persist generated files, store downloaded content, or make files available by URL.

### Generate PDF

Render HTML or markdown as a PDF, store it in asset storage, and return a shareable URL.

Use **Generate PDF** to create downloadable reports, invoices, certificates, or other PDF documents.

## Actions

Use the **Actions** category to call APIs, run code, send messages, and control your Flow.

### Make API Call

Send an HTTP request with control over the method, headers, body, and authentication.

Use **Make API Call** to call third-party APIs, send webhooks, or integrate with external services.

### Wait Until

Pause your Flow for a set amount of time, or poll an API until a condition is met. You can check a status code or a response value.

Use **Wait Until** to wait for an external process, poll for readiness, or add a delay between steps. For how long a Flow can wait, see [Timeouts and long-running work](/user-guide/flows/timeouts-and-long-running-work).

### Send Email

Send an email with HTML or plain-text content. The step also supports reply-to, cc, bcc, and attachments.

To send from the platform-managed sender, leave **from** blank. To send from your own address, add a Resend API key in **Settings > Integrations**. A custom sender address can't use the platform-managed sender's domain.

Use **Send Email** for notifications, alerts, customer communication, or AI-generated reports.

### Run Code

Run custom code in a sandbox to transform data, calculate values, or apply logic that other step types don't cover. The default environment runs JavaScript. To run TypeScript or Python, choose **Runtype Sandbox** or **Daytona Sandbox**, then set the language.

Use **Run Code** to reshape data between steps. For environments, network access, and script examples, see [Using transform-data steps](/user-guide/flows/using-transform-data-steps).

### Send Event

Send an analytics event to PostHog. Before you use this step, add your PostHog Project API Key in **Settings > Integrations**. For more information, see [PostHog integration](/user-guide/settings/integrations-posthog-weaviate-daytona#posthog-integration). To send an event to another analytics service, use **Make API Call** with that service's ingestion endpoint.

Use **Send Event** to track usage, log events, or trigger analytics workflows.

### Set Variable

Set a Flow variable to a static value, a template string, or a JSON object without running code. A reference inside other text becomes part of a string. A value that consists of one `{{reference}}` keeps its original type, such as an object, array, number, boolean, or null.

Use **Set Variable** to initialize variables, set defaults, copy a nested field, or pass data between steps.

### Execute Agent

Run an existing Agent with a message and capture its response. Use this step to combine a Flow with an Agent.

Use **Execute Agent** to delegate work to an Agent or combine Flow control with Agent behavior.

> **Note**
>
> The step picker doesn't list **Execute Agent**. Add the step through the API, MCP, or the
> TypeScript SDK.

### Conditional Logic

Branch your Flow based on a condition. Define the steps that run when the condition is true and the steps that run when it's false.

Use **Conditional Logic** for if/else logic, data-based routing, error handling, or skipping steps. For condition syntax, see [Using conditional steps](/user-guide/flows/using-conditional-steps). To branch on a typed verdict from a model, see [Judgments](/user-guide/flows/judgments).

### Bounded Loop

Repeat a set of steps until an exit condition (`until`) is true. The steps always run once before the Flow checks the condition. You must set a maximum of 1 to 10 rounds (`maxIterations`). Every round shares the same Flow variables.

Use **Bounded Loop** for draft/review/revise, generate/validate/repair, and other bounded refinement sequences. For configuration examples, see [Using bounded loops](/user-guide/flows/using-bounded-loops).

> **Note**
>
> The step picker doesn't list **Bounded Loop**. Author bounded loops through the API, MCP, or the
> TypeScript SDK.

### Tool Call

Call a tool directly from a Flow step with parameters that you set, without a model choosing the tool. The tool can be a saved tool or a built-in or platform catalog tool, such as `builtin:store_asset`. For catalog IDs, see [Built-in tools](/user-guide/tools/built-in-tools). Pass a catalog tool's settings, such as a Slack `integrationId`, in the optional `config.toolConfig` object. Saving the Flow fails when no tool handles the catalog ID. For more information, see [Tool-call step points at an unknown catalog tool](/user-guide/flows/flow-validation-warnings#tool-call-step-points-at-an-unknown-catalog-tool).

Use **Tool Call** for deterministic tool execution, saved-tool API calls, or data pipelines. The step picker doesn't list **Tool Call**, so add the step through the API, MCP, or the TypeScript SDK.

> **Warning**
>
> A Tool Call step has **no approval gate**. It runs whenever the Flow reaches it, with the parameters that you wrote. A step on `builtin:send_email` or a `builtin:browser:*` tool sends and browses unattended. Approval gating applies only to tool calls that a model chooses in an Agent or a prompt step.

## Replies

Use the **Replies** category to send data from your Flow to the client.

### Send Stream of Data

Stream data to the client while your Flow runs instead of waiting for the complete result.

Use **Send Stream of Data** to show progress updates, stream AI responses, or provide real-time feedback.

## When a step fails

Many Context and Actions steps, such as **Fetch URL**, **Send Email**, and **Run Code**, don't stop the Flow when they fail. The step records the error and writes its default value to the output variable, and the Flow continues. To stop the Flow instead, open the step's **Error Handling** panel and choose **Stop on error**. To try alternative approaches first, choose **Use fallbacks**.

Some steps behave differently:

* **Generate Embedding**, **Vector Search**, **Store Vector**, and **Paginate API** stop the Flow when they fail, unless you explicitly choose **Continue on error**.
* **Tool Call** ignores **Error Handling** and uses its own `onError` setting. When `onError` is unset, a failed tool call stops the Flow. Set it to `continue` to store `{ "error": "...", "result": null }` and keep going. Set it to `retry`, or set `maxRetries`, to call the tool again, up to `maxRetries` attempts (3 when unset). Otherwise the step doesn't call a failed tool again, because a second call repeats the tool's side effects. For more information, see [Tool-call step ignores errorHandling](/user-guide/flows/flow-validation-warnings#tool-call-step-ignores-errorhandling).

A step that continues after an error can pass an empty or default value to later steps. To find these failures, see [Flow execution failures](/user-guide/troubleshooting-faq/flow-execution-failures).

## Working with external services

Some steps connect to external services:

* **AI Search** uses **Exa Search API** or a search-capable model.
* **Fetch URL** supports Firecrawl and Massive for enhanced web scraping.
* **Vector Search** and **Store Vector** use a vector store: **PostgreSQL (pgvector)**, **Weaviate**, or **Cloudflare Vectorize**.

To create GitHub issues, send Slack messages, or post to Linear, add that integration's tools to a **Run Agent** step. You can also call the service's REST API with **Make API Call**.

For GitHub content, use **Make API Call** with the GitHub REST API (`https://api.github.com`), or add the GitHub tools to a **Run Agent** step. For integration details, see [GitHub integration](/user-guide/integrations/github-integration). To clone a repository and work on it, use **Run Code** with a container sandbox provider.

## Common flow patterns

Use the following sequence as a starting point for a typical Flow:

1. **Validate and prepare**: Use **Run Code** or **Conditional Logic** to check and shape incoming data.
2. **Gather context**: Load Records, call APIs, or search the web for information that the AI needs.
3. **Process with AI**: Use **Run Task** or **Run Agent** to generate or analyze content. Use **Extract Fields** to read typed values out of the input.
4. **Format the output**: Transform results into the shape that your application expects.
5. **Save and notify**: Use **Upsert Record**, **Send Email**, **Make API Call**, or **Send Stream of Data**.

You don't need every step in every Flow. Start with one **Run Task** step, then add steps as your Flow needs them.

## Next steps

Continue with one of these guides:

* [Creating and editing flows](/user-guide/flows/creating-and-editing-flows): build and test a Flow.
* [Choosing between a flow and an agent](/user-guide/flows/choosing-between-a-flow-and-an-agent): decide which one fits your task.
* [Flow variables and templates](/user-guide/flows/flow-variables-and-templates): pass data between steps.
* [Connecting AI model providers](/user-guide/integrations/connecting-ai-model-providers): configure model access.
* [Quickstart: Social Media Post Generator](/user-guide/getting-started/quickstart-social-media-post-generator): deploy a Flow as a REST API.
* [What are Agents?](/user-guide/agents/what-are-agents): choose an Agent for multi-turn behavior and tool use.
* [What are Tools?](/user-guide/tools/what-are-tools): add tools to Agents and Flows.
* [Using Wait Until steps](/user-guide/flows/using-wait-until-steps): pause a Flow for a delay or until a polled condition is met.
* [Using crawl, search, and paginate-api steps](/user-guide/flows/using-crawl-search-and-paginate-steps): crawl a website, run an AI search, and page through an API.
* [Using tool-call steps](/user-guide/flows/using-tool-call-steps): call a saved or built-in Tool from a Flow step.
* [Using vector steps](/user-guide/flows/using-vector-steps): generate embeddings, store vectors, and run vector search in a Flow.
* [Using memory steps](/user-guide/flows/using-memory-steps): save and recall memory from a Flow.
* [Using output steps](/user-guide/flows/using-output-steps): send email, render templates, generate PDFs, store assets, and send events.