router
Schema Definition
type: object
required:
- type
- name
- inputs
properties:
type:
type: string
enum: [router]
description: Block type identifier
name:
type: string
description: Display name for this router block
inputs:
type: object
required:
- prompt
- model
- apiKey
properties:
prompt:
type: string
description: Instructions for routing decisions and criteria
model:
type: string
description: AI model identifier (e.g., gpt-4o, gemini-2.5-pro, deepseek-chat)
apiKey:
type: string
description: API key for the model provider (use {{ENV_VAR}} format)
temperature:
type: number
minimum: 0
maximum: 2
description: Model temperature for routing decisions
default: 0.3
azureEndpoint:
type: string
description: Azure OpenAI endpoint URL (required for Azure models)
azureApiVersion:
type: string
description: Azure API version (required for Azure models)
connections:
type: object
description: Multiple connection paths for different routing outcomes
properties:
success:
type: array
items:
type: string
description: Array of target block IDs for routing destinationsConnection Configuration
Router blocks use a success array containing all possible routing destinations:
Examples
Content Type Router
Priority Router
Department Router
Advanced Configuration
Multiple Models Router
Output References
Router blocks don't produce direct outputs but control workflow path:
Best Practices
Provide clear routing criteria in the prompt
Use specific, descriptive target block names
Include examples of content for each routing path
Use lower temperature values for consistent routing
Test with diverse input types to ensure accurate routing
Consider fallback paths for edge cases
Was this helpful?
