> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyreach.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Output step

> Return a structured result and terminate the execution path.

The Output step ends a branch of execution and produces the workflow's return value. Every reachable branch in a workflow should terminate with an Output step.

<Frame>
  <img src="https://mintcdn.com/anyreach/GFaEe88vPFOHwtmC/images/workflows/output.png?fit=max&auto=format&n=GFaEe88vPFOHwtmC&q=85&s=1a7413d033daeb39b1221ad5335f6c2e" alt="Output step inspector" width="3108" height="1926" data-path="images/workflows/output.png" />
</Frame>

## What it does

* Evaluates any expressions in the output fields
* Returns the result to the caller
* Terminates that path of execution with status `success`

A workflow with multiple Output steps (one per Condition branch) returns whichever Output step execution reached.

## Output fields

Each output field has:

* **Name** — the key returned to the caller
* **Type** — `string`, `number`, `boolean`, `array`, or `object`
* **Value** — a literal value or expression resolved against `ctx`

## When to use multiple Output steps

Use a separate Output step on each branch of a Condition step so every path has a clear termination:

```
[Condition]
  ├─ found       →  [Output: success — with contact data]
  ├─ not_found   →  [Output: not found — with error message]
  └─ default     →  [Output: error — with fallback]
```

This is cleaner than one Output step with conditional field values.

## Examples

### Simple success output

```json theme={null}
{
  "success": true,
  "contact_name": "{{ `Lookup contact`.body.first_name }}",
  "tier": "{{ `Lookup contact`.body.tier }}"
}
```

### Not-found output

```json theme={null}
{
  "success": false,
  "message": "No contact found for that email address."
}
```

### Agent-tool friendly output

When the workflow is invoked as an agent tool, keep output small and text-focused. The agent's LLM uses the output to formulate a spoken response:

```json theme={null}
{
  "summary": "Account tier is {{ n1.body.tier }}, balance is {{ n1.body.balance }}, last active {{ n1.body.last_seen }}."
}
```

A single `summary` string is more robust than a deeply-nested object the LLM has to navigate.

## Considerations

* **Output terminates the path.** Any steps connected after an Output are unreachable.
* **Pure expressions preserve types.** `{{ n1.balance }}` returns a number if the source is a number. Mixing with text (e.g., `"Balance: {{ n1.body.balance }}"`) always produces a string.
