# Overview

The building components of your AI workflows

Blocks are the building components you connect together to create AI workflows. Think of them as specialized modules that each handle a specific task—from chatting with AI models to making API calls or processing data.

[Video: connections.mp4](https://d4h6f8f5tksdw.cloudfront.net/connections.mp4)

## Core Block Types

SteelEngine provides essential block types that handle the core functions of AI workflows:

### Processing Blocks

* **[Agent](/blocks/agent)** - Chat with AI models (OpenAI, Anthropic, Google, local models)
* **[Chat](/blocks/chat)** - Run the workspace assistant with access to workspace context, memory, and tools
* **[Function](/blocks/function)** - Run custom JavaScript or Python code
* **[API](/blocks/api)** - Connect to external services via HTTP requests
* **[Webhook](/blocks/webhook)** - Send a POST request to an external webhook URL
* **[PDF Creator](/blocks/pdf-creator)** - Use an AI document agent to write, render, and visually review a PDF. Takes Messages, an optional Style Guide, File Name, and Images. Returns the generated file as `fileId`, `fileName`, `mimeType`, and `file`
* **[PPTX Creator](/blocks/pptx-creator)** - Use an AI presentation agent to write, render, and visually review a slide deck. Takes Messages, an optional Style Guide, File Name, Slide Layout, and Max Slides. Returns the generated file as `fileId`, `fileName`, `mimeType`, and `file`

### Logic Blocks

* **[Condition](/blocks/condition)** - Branch workflow paths based on boolean expressions
* **[Router](/blocks/router)** - Use AI to intelligently route requests to different paths
* **[Evaluator](/blocks/evaluator)** - Score and assess content quality using AI
* **[Judgment](/blocks/judgment)** - Classify, decide yes or no, or score content with TypeSafe Jev, and branch on the typed answer and its probabilities
* **[Laya Decision](/blocks/laya)** - Fast typed decisions with probabilities from Laya, a decision model SteelEngine hosts itself, with no API key or per-call cost
* **[Guardrails](/blocks/guardrails)** - Validate content as JSON, against a regex, for PII, or against a knowledge base before it moves on

### Control Flow Blocks

* **[Variables](/blocks/variables)** - Set and manage workflow-scoped variables
* **[Wait](/blocks/wait)** - Pause workflow execution for a specified time delay
* **[Human in the Loop](/blocks/human-in-the-loop)** - Pause for human approval and feedback before continuing
* **[Loop](/blocks/loop)** - Run the blocks inside a container repeatedly
* **[Parallel](/blocks/parallel)** - Run the blocks inside a container across concurrent branches
* **[Parallel Window](/blocks/parallel-window)** - Run a container over a collection, with at most a set number of items (1-20) active at once
* **[Workflow](/blocks/workflow)** - Run another workflow as a step in this one

### Data Blocks

These blocks reshape arrays and records without code. Each takes its input from an upstream block reference such as `<api.data>` and returns the fields named below. The transform blocks also return the primary output as `result`.

* **API Batch** - Run an array of HTTP requests with bounded concurrency, shared default headers, and per-request overrides. Takes a list of requests. Returns `results` in input order with `successCount`, `errorCount`, and `totalCount`
* **Array Filter Sort** - Filter, sort, dedupe, offset, and limit a list of records. Takes an array and filter rules. Returns `items` and `counts`
* **Array Group** - Group records by a key path, as an array of groups or a key-to-values map, with optional aggregations. Takes an array and a key path. Returns `groups`, `map`, and `counts`
* **Array Join** - Join two record arrays by key paths with left, inner, right, or full semantics. Takes primary and secondary arrays. Returns `rows`, `matched`, `unmatchedPrimary`, `unmatchedSecondary`, and `counts`
* **JSON Mapper** - Reshape an object or array with path, template, and constant mappings. Takes an input value and a mapping list. Returns `results` and `count`
* **Record Diff** - Compare current and desired record arrays by key. Takes two arrays. Returns `create`, `update`, `delete`, `unchanged`, and `counts`
* **Validate Records** - Validate and normalize records against rules, then split, annotate, or fail. Takes an array and rules. Returns `records`, `valid`, `invalid`, `errors`, and `counts`

### Output Blocks

* **[Response](/blocks/response)** - Format and return final results from your workflow

### Other Blocks

* **[Credential](/blocks/credential)** - Hold a credential that other blocks reference
* **Note** - Leave Markdown notes (with YouTube embeds) on the canvas for collaborators. Notes do not execute and have no outputs

## How Blocks Work

Each block has three main components:

**Inputs**: Data coming into the block from other blocks or user input
**Configuration**: Settings that control how the block behaves
**Outputs**: Data the block produces for other blocks to use

<strong>Receive Input</strong>: Block receives data from connected blocks or user input

<strong>Process</strong>: Block processes the input according to its configuration

<strong>Output Results</strong>: Block produces output data for the next blocks in the workflow

## Connecting Blocks

You create workflows by connecting blocks together. The output of one block becomes the input of another:

* **Drag to connect**: Drag from an output port to an input port
* **Multiple connections**: One output can connect to multiple inputs
* **Branching paths**: Some blocks can route to different paths based on conditions

[Video: connections.mp4](https://d4h6f8f5tksdw.cloudfront.net/connections.mp4)

## Common Patterns

### Sequential Processing

Connect blocks in a chain where each block processes the output of the previous one:

```
User Input → Agent → Function → Response
```

### Conditional Branching

Use Condition or Router blocks to create different paths:

```
User Input → Router → Agent A (for questions)
                   → Agent B (for commands)
```

### Quality Control

Use Evaluator blocks to assess and filter outputs:

```
Agent → Evaluator → Condition → Response (if good)
                              → Agent (retry if bad)
```

## Block Configuration

Each block type has specific configuration options:

**All Blocks**:

* Input/output connections
* An error output handle that routes execution when the block fails

**AI Blocks** (Agent, Router, Evaluator):

* Model selection (OpenAI, Anthropic, Google, local)
* API keys and authentication
* Temperature and other model parameters
* System prompts and instructions

**Logic Blocks** (Condition, Function):

* Custom expressions or code
* Variable references
* Language selection (Function)

**Integration Blocks** (API, Response):

* Endpoint configuration
* Headers and authentication
* Request/response formatting
* Request timeout and retries (API)

[Agent Block](/blocks/agent)

Connect to AI models and create intelligent responses

[Function Block](/blocks/function)

Run custom code to process and transform data

[API Block](/blocks/api)

Integrate with external services and APIs

[Condition Block](/blocks/condition)

Create branching logic based on data evaluation

[Human in the Loop Block](/blocks/human-in-the-loop)

Pause for human approval and feedback before continuing

[Variables Block](/blocks/variables)

Set and manage workflow-scoped variables

[Wait Block](/blocks/wait)

Pause workflow execution for specified time delays

## Common Questions

**How many block types are available in SteelEngine?**

SteelEngine has over 200 blocks in its registry, spanning core workflow blocks (Agent, Function, Condition, Router, etc.), integration blocks for third-party services (Gmail, Slack, GitHub, Notion, and many more), and trigger blocks that start workflows from external events like webhooks or schedules. Loop and parallel execution are built into the execution engine as container constructs on the canvas, rather than being standalone registry blocks.

**Can one block's output connect to multiple downstream blocks?**

Yes. A single output port can connect to multiple input ports on different blocks. This lets you fan out data from one processing step to several parallel paths without needing to duplicate the block.

**What happens if a block in the middle of a workflow fails?**

When a block encounters an error, the workflow stops executing along that path. Every block has an error output handle. Connect it to a downstream block, and on failure execution follows that connection instead of halting the entire workflow.

**What is the difference between Processing blocks and Logic blocks?**

Processing blocks (Agent, Function, API) transform or generate data — they do the actual work. Logic blocks (Condition, Router, Evaluator) make decisions about which path the workflow should take based on the data, without modifying it themselves.

**Can I use blocks from different categories together in one workflow?**

Absolutely. A typical workflow combines blocks from multiple categories. For example, you might use a trigger block to start the workflow, an Agent block to process input, a Condition block to branch logic, and an integration block like Gmail to send results.

**Are there container blocks that can hold other blocks inside them?**

Yes. Loop and Parallel are execution engine constructs that appear as container regions on the canvas. You drag other blocks inside them. Loop containers execute their contained blocks repeatedly, while Parallel containers execute their contained blocks concurrently across multiple branches. Unlike registry blocks, these are handled directly by the execution engine.
