YAML Schema
This section contains the complete YAML schema definitions for all available block types in Agent Forge. Each block type has specific configuration requirements and output formats.
Core Blocks
These are the essential building blocks for creating workflows:
Starter BlockWorkflow entry point supporting manual triggers, webhooks, and schedulesAgent BlockAI-powered processing with LLM integration and tool supportFunction BlockCustom JavaScript/TypeScript code execution environmentResponse BlockFormat and return final workflow results
Logic & Control Flow
Blocks for implementing conditional logic and control flow:
Condition BlockConditional branching based on boolean expressionsRouter BlockAI-powered intelligent routing to multiple pathsLoop BlockIterative processing with for and forEach loopsParallel BlockConcurrent execution across multiple instances
Integration Blocks
Blocks for connecting to external services and systems:
Advanced Blocks
Specialized blocks for complex workflow patterns:
Evaluator BlockValidate outputs against defined criteria and metricsWorkflow BlockExecute other workflows as reusable components
Common Schema Elements
All blocks share these common elements:
Basic Structure
block-id:
type: <block-type>
name: <display-name>
inputs:
# Block-specific configuration
connections:
# Connection definitions
Connection Types
- success: Target block for successful execution
- error: Target block for error handling (optional)
- conditions: Multiple paths for conditional blocks
Environment Variables
Use double curly braces for environment variables:
inputs:
apiKey: '{{API_KEY_NAME}}'
endpoint: '{{SERVICE_ENDPOINT}}'
Block References
Reference other block outputs using the block name in lowercase:
inputs:
userPrompt: <blockname.content>
data: <functionblock.output>
originalInput: <start.input>
Validation Rules
All YAML blocks are validated against their schemas:
- Required fields: Must be present
- Type validation: Values must match expected types
- Enum validation: String values must be from allowed lists
- Range validation: Numbers must be within specified ranges
- Pattern validation: Strings must match regex patterns (where applicable)
Quick Reference
Block Types and Properties
| Block Type | Primary Output | Common Use Cases |
|---|---|---|
| starter | .input |
Workflow entry point |
| agent | .content |
AI processing, text generation |
| function | .output |
Data transformation, calculations |
| api | .output |
External service integration |
| condition | N/A (branching) | Conditional logic |
| router | N/A (branching) | Intelligent routing |
| response | N/A (terminal) | Final output formatting |
| loop | .results |
Iterative processing |
| parallel | .results |
Concurrent processing |
| webhook | .payload |
External triggers |
| evaluator | .score |
Output validation, quality assessment |
| workflow | .output |
Sub-workflow execution, modularity |
Required vs Optional
- Always required:
type,name - Usually required:
inputs,connections - Context dependent: Specific input fields vary by block type
- Always optional:
errorconnections, UI-specific fields
