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

# Structured Agent Output

> Validate agent execution results against defined schemas at step handoffs to prevent downstream errors.

**Structured Agent Output** enforces schema validation on AI agent results at step handoff boundaries within workflows, ensuring downstream steps receive predictable, well-formed data.

In multi-step automation, a missing or malformed data field from an upstream agent often triggers obscure failures multiple steps later. Structured output validation catches schema discrepancies immediately at the point of origin and surfaces the exact property at fault.

> [!NOTE]
>
> **Prerequisite**: Configured within agent workflow steps. See [Workflow Overview](https://docs.revolte.ai/workflows/overview.md).

## Key capabilities

### Handoff-level schema validation

Before an agent's execution output passes to the next node in the workflow, Revolte evaluates the payload against the agreed schema contract for that step.

### Seamless passthrough for valid payloads

When the agent's output complies with the expected format, execution continues to the subsequent node without delay or manual intervention.

### Isolated error reporting

If a required field is missing or contains an unexpected data type, Revolte halts the run at that specific node. The error message names the exact field requiring attention, preventing cascading failures downstream.

***

## Why structured output matters

Downstream automation nodes—particularly [If/Else Conditional Nodes](https://docs.revolte.ai/workflows/branching.md)—rely on specific field keys and values to make accurate routing decisions.

By enforcing schema contracts at each handoff:

* Conditional expressions can safely evaluate properties without risking null pointer or parsing exceptions.
* Custom actions receive strongly-typed parameters.
* Debugging is localized directly to the agent step that generated the output.

***

## Handling validation errors

When a workflow run stops due to a structured output error:

**1. Inspect the Error Message**

Open the stopped workflow run under **Agent runs**. The error notification will highlight the specific field name and expected schema rule that failed.

**2. Update Agent Instructions or Context**

Review the agent's prompt or context attachments to clarify the required output structure.

**3. Rerun the Workflow**

Trigger the run again to confirm that the agent produces a conforming result payload and successfully advances to the next step.

***

## Current limitations & notes

* **Strict Validation**: Malformed outputs halt the run at the emitting node to protect downstream processes.
* TODO: confirm with engineering: Specification mechanism for output schemas (e.g. JSON Schema, TypeScript definitions, or Studio visual schema editor).
* TODO: confirm with engineering: Whether validation applies universally to all agent nodes or is toggled per workflow/node.
* TODO: confirm with engineering: Availability of automated agent retry loops upon schema validation failure.

***

## Next steps

* [If/Else Conditional Nodes](https://docs.revolte.ai/workflows/branching.md) — Use structured agent data to route workflows.
* [Standalone Code Review Agent](https://docs.revolte.ai/workflows/standalone-code-review.md) — Request on-demand code reviews on target branches.
* [Review Execution Plan](https://docs.revolte.ai/workflows/review-execution-plan.md) — Inspect agent execution plans before implementation begins.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.