All nodes/AI/LLM
Structured Output LLM
Calls an LLM and returns the response strictly in JSON format according to a given schema (structured output). Used when you need typed output rather than free text. Requires an LLM via link_llm.
Type in the graph: structured_output_llm
Exec
An error branch can be enabled (expose_error_output) to handle failures on their own path.
Ports can be split into separate execution and data handles.
Try it
Minimal working workflow
- Execute + Data
- LLM
Runs as pasted
When to use it
Reach for this node when the model’s answer has to travel on as data rather than as text: splitting an email into fields, classifying a request, pulling out an amount and a date, producing a list of tags. The model must answer with an object matching your JSON Schema, so the next node receives a ready object instead of a string to parse. For free text in a chat use LLM Response; for a model that acts on its own use the AI Agent.
How it works
The schema goes in the “Structured output schema” field. Its fields are available downstream as
{{ nodes.<id>.output.<field> }}, and the whole object travels along the edge. The default
schema has a single string field result, so a freshly dropped node runs immediately; replace it
with your own shape.
The top-level schema must be an object. An array or a scalar is wrapped automatically into an
object with one value field, and the result then has to be read as
{{ nodes.<id>.output.value }}.
Field descriptions are read by the model as instructions. One precise field description often
does more than a paragraph in the system prompt.
The node does not stream: the answer arrives whole, once the model has finished it.
Common mistakes
- The System port is wired but the prompt did not change. “System prompt source” defaults to “Template”, and a connected port is not read in that mode. Switch it to the connected System port, or to Auto.
- Sending the object straight to Exit. The chat then shows JSON. If a
human needs to read it, assemble the text with a Template node — or
add a
textfield to the schema and let Exit show that. - An exotic schema. Not every model accepts
pattern,format,oneOf/anyOf/allOfor deeply nested$ref. If the node fails saying no structured-output method worked, simplify the schema or change the model. - An empty result. The model returned a refusal instead of an object: check that the schema is an object at the top level and that the prompt really asks for those fields.
Inputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
LLMllm | LLMlink_llm | — | LLM config from llm node (registry or workspace connection) |
Messagemessage | Execute + Dataexecute_data | message | User message sent to the LLM |
Systemsystem | Datadata | — | System prompt override |
Outputs
| Port | Wire | Payload | Notes |
|---|---|---|---|
Outputoutput | Execute + Dataexecute_data | object |
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
Message Sourcemessage_source | string | auto | auto -- use connected input if available, else template; connected -- always from edge; template -- always from template Options: |
User Message Templateuser_prompt_template | string | "" | Used when source=template or no edge connected. Supports {{inputs.message}}, {{nodes.xxx.output.yyy}} supports templates |
System Prompt Sourcesystem_source | string | template | auto -- use connected system input if available, else template Options: |
System Promptsystem_prompt | string | "" | System prompt template supports templates |
Structured Output Schemastructured_output | object | {"type":"object","properties":{"result":{"type":"string","description":"The m… | JSON Schema object the model must answer with; the top-level title is optional (it becomes the API tool name). Defaults to a single string 'result' field so a freshly dropped node runs — replace it with your shape. |
| Advanced | |||
Use Chat Historyuse_chat_history | boolean | false | Pass full chat history to LLM instead of only last message |
Shared fields
Every node has these three — the platform adds them, not the node author.
expose_error_output— When enabled, show an execution output to connect nodes that run if this step fails.split_ports_in— Show separate execution and data input handles instead of one combined port.split_ports_out— Show separate execution and data output handles instead of one combined port.