Skip to main content
For advanced users who prefer code editing or need version-controlled pipeline definitions.

What is YAML View

A code editor for pipelines in the Configuration tab (alongside Flow Editor) that provides direct access to pipeline YAML definitions. Features:
  • Instant Flow Sync: Changes sync instantly between YAML and Flow views
  • Syntax Highlighting: Color-coded YAML structure with CodeMirror
  • Real-time Validation: Immediate error feedback
  • Find & Replace: Ctrl+F (Windows) or ⌘+F (Mac)
  • Version Control: Copy/paste YAML for backup or sharing YAML Editor Interface

Schema Structure

Every pipeline has three required top-level sections:

State Configuration

Defines all variables used across the pipeline. Each has a type and optional default value.

State Syntax

Default variables like input and messages don’t require initial values—they are populated during pipeline execution.
Data Types: Example:
  • Use descriptive names (user_query vs q)
  • Initialize accumulators ('', [], 0)
  • See States Guide for details

Node Configuration

The nodes array contains all pipeline nodes with common structure plus node-specific fields. Common Fields (all nodes):

Node-Type-Specific Configurations

Configurations for key node types. See Nodes Overview for the full list of all 11 node types.

1. LLM Node

Calls language models with system/task prompts.
Mapping Types: fixed (static), variable (state reference), fstring (template with {var})

2. Agent Node

Executes pre-configured agents.

3. Code Node

Executes Python in sandbox.
Use alita_state.get('var') to access state variables, return dict with structured_output: true

4. Router Node

Template-based routing with Jinja2.

5. Decision Node

LLM-powered routing.

6. State Modifier Node

Transforms state with Jinja2 templates.
Advanced Example:

7. HITL Node

Pauses pipeline execution and waits for a human decision (Approve, Edit, or Reject) before continuing.
User Message Types:
  • Only configured routes appear as buttons in the UI — omit routes you don’t need
  • edit requires edit_state_key to be set; omitting either hides the Edit button
  • Use END as a route value to terminate the pipeline for that action
  • HITL nodes do not use transition — routing is handled entirely by routes

Entry Point

Specifies the first node to execute.
Must reference existing node ID; only one per pipeline; Router nodes cannot be entry points

Interrupts

Defines pause points for user input. See Nodes Connectors.
Human-in-the-loop workflows, review checkpoints, approval gates

Connections

Nodes connect via transition, condition, decision, or routes. See Nodes Connectors. Simple Transition:
Router:
Decision:
HITL Routes:

Editor Features

CodeMirror Capabilities:
  • Syntax highlighting with color-coded structure
  • Error detection (red underlines for invalid YAML)
  • Auto-indentation for nested structures
  • Line numbers for navigation
  • Find & Replace: Ctrl+F (Windows) / ⌘+F (Mac) CodeMirror Highlighting
Two-Way Sync: Changes sync instantly between YAML and Flow Editor.
  • YAML → Flow: Add node in YAML → appears in Flow canvas
  • Flow → YAML: Add node via Flow + button → YAML updates automatically
Start in Flow for layout → switch to YAML for bulk edits → copy YAML for version control

YAML Guide

Syntax Rules

Indentation (use spaces, not tabs):

Strings with Special Characters

Lists (use block style):
Booleans/Null (lowercase):

Common Errors

Missing Quotes:
Undefined Node:
Invalid Type:
Missing Fields:

Validation Checklist

Before saving:
  • Entry point references existing node ID
  • All node IDs are unique
  • All transitions reference existing nodes or END
  • State variables in nodes are defined in state
  • Input/output arrays use valid variable names
  • Node-specific fields complete (e.g., LLM has input_mapping)
  • No YAML syntax errors (red underlines)
  • Indentation uses spaces
  • Quotes around special characters (:, {, %)

Best Practices

  1. Start Visual, Refine in Code: Use Flow Editor for layout → YAML for bulk edits
  2. Bulk Updates: Find/replace to update toolkit names, node IDs
  3. Test Incrementally: Add one node at a time, run pipeline after each
  4. Version Control: Copy YAML to files, commit to git
  5. Use Comments: