NodeFox logoNodeFox

Schemas

Why use schemas?

Without a schema, AI models return free-form text. With a schema attached to a Conversation node, the model returns a JSON object guaranteed to match your schema — specific fields, specific types, every time.

This unlocks reliable downstream processing:

  • Data nodes can extract properties without guessing the response format
  • Decision nodes can evaluate fields that always exist
  • Transform mode can automatically split properties across output slots
  • Multiple pipeline stages can depend on each other's output shapes

Creating schemas

Navigate to the Schemas panel (⌘+G → S). NodeFox offers three ways to define a schema:

Raw JSON

Write or paste a JSON Schema directly in the code editor. Full control — nested objects, arrays, enums, custom constraints, everything the spec supports.

Best for: complex schemas with deep nesting.

Visual builder

Use a form interface to add properties one by one. Select the type, mark fields as optional, toggle array mode, and add descriptions.

Best for: simple to moderate schemas. Quick iteration without writing JSON.

From JSON

Paste a sample JSON object and NodeFox infers the schema automatically. Edit the generated schema to refine types, add optional fields, and adjust constraints.

Best for: when you already have example data.

Property types

TypeDescription
stringText values. Add a description to guide the model on expected content.
numberFloating-point numbers.
integerWhole numbers only.
booleanTrue or false.
enumOne of a predefined set of string values. Use for classification, status, or constrained choices.
objectNested JSON object with its own properties.
arrayA list of items. Toggle the array button on any property type to make it a list.

Attaching a schema to a Conversation node

  1. Select a Conversation node on the canvas.
  2. In the node settings, find the Schema dropdown.
  3. Select your schema.
  4. The model will now return structured JSON conforming to the schema.

Transform mode

Transform mode automatically extracts individual properties from the structured JSON response and routes them to separate output slots. This eliminates the need for a separate Data node when you want to split a schema response.

Configuration:

FieldDescription
PropertiesList of property names to extract, in order
From (starting slot)The first output slot to use

Example: Schema has properties title, summary, score. With Transform starting at slot 1:

  • title → output slot 1
  • summary → output slot 2
  • score → output slot 3

Each property flows to its own downstream branch.

Use Transform mode when you want to immediately fan out a schema response to multiple branches. Use a separate Data node when you need more complex extraction logic or selectors.

Schema shorthand in Data nodes

Data nodes support a shorthand for auto-populating selections from a schema:

PatternEffect
&SchemaName!Creates selections for every optional property, mapped to sequential output slots
&SchemaName.path.to.object!Targets a specific nested object within the schema

Example: &AnalysisResult! on a Data node automatically creates:

  • title → slot 1
  • summary → slot 2
  • score → slot 3

(Based on the schema's optional fields, in order.)