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

Schema Structure
Every pipeline has three required top-level sections:| Field | Type | Required | Description |
|---|---|---|---|
entry_point | String | ✔️ | Starting node ID |
state | Object | ✔️ | State variable definitions |
nodes | Array | ✔️ | Node configurations |
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.| Type | Example |
|---|---|
string | "Hello" |
number | 42, 3.14 |
list | [], ["a", "b"] |
JSON | {}, {"key": "value"} |
Node Configuration
Thenodes array contains all pipeline nodes with common structure plus node-specific fields.
Common Fields (all nodes):
| Field | Type | Required | Description |
|---|---|---|---|
id | String | ✔️ | Unique node identifier |
type | String | ✔️ | Node type (see overview) |
input | Array | ✔️ | State variables to read |
output | Array | ✔️ | State variables to write |
transition | String | Conditional | Next node ID (not needed with condition, decision, or END) |
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.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: true4. Router Node
Template-based routing with Jinja2.5. Decision Node
LLM-powered routing.6. State Modifier Node
Transforms state with Jinja2 templates.7. HITL Node
Pauses pipeline execution and waits for a human decision (Approve, Edit, or Reject) before continuing.| Type | Description | Example |
|---|---|---|
fixed | Static text shown as-is | "Please approve to continue." |
fstring | Template with {state_key} placeholders resolved from state | "Review draft:\n\n{draft_content}" |
variable | Reads the entire message from a named state variable | review_message |
- Only configured routes appear as buttons in the UI — omit routes you don’t need
editrequiresedit_state_keyto be set; omitting either hides the Edit button- Use
ENDas a route value to terminate the pipeline for that action - HITL nodes do not use
transition— routing is handled entirely byroutes
Entry Point
Specifies the first node to execute.Interrupts
Defines pause points for user input. See Nodes Connectors.Connections
Nodes connect viatransition, condition, decision, or routes. See Nodes Connectors.
Simple Transition:
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)
- YAML → Flow: Add node in YAML → appears in Flow canvas
- Flow → YAML: Add node via Flow
+button → YAML updates automatically
YAML Guide
Syntax Rules
Indentation (use spaces, not tabs):Strings with Special Characters
Common Errors
Missing Quotes: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
Use Descriptive IDs
Use Descriptive IDs
Initialize Defaults
Initialize Defaults
Multi-Line Templates
Multi-Line Templates
Group Nodes with Comments
Group Nodes with Comments
Don't Hardcode Secrets
Don't Hardcode Secrets
Avoid Unreachable Nodes
Avoid Unreachable Nodes
Always Terminate
Always Terminate
Workflow Tips
Workflow Tips
- Start Visual, Refine in Code: Use Flow Editor for layout → YAML for bulk edits
- Bulk Updates: Find/replace to update toolkit names, node IDs
- Test Incrementally: Add one node at a time, run pipeline after each
- Version Control: Copy YAML to files, commit to git
- Use Comments:
- Flow Editor - Visual pipeline building
- States - State variable design
- Nodes Overview - All node types
- Nodes Connectors - Connection patterns
- Entry Point - Entry point rules
- Interaction Nodes - LLM, Agent
- Execution Nodes - Toolkit, MCP, Code, Custom nodes
- Control Flow Nodes - Router, Decision, HITL
- Utility Nodes - State Modifier, Printer