Esquema YAML de Flow
Resumen
Sección titulada «Resumen»Los flows se definen en archivos YAML con la extensión .ygtc. Esta referencia cubre el esquema completo.
Estructura de Nivel Superior
Sección titulada «Estructura de Nivel Superior»name: string # Required: Flow identifierversion: string # Required: Semantic versiondescription: string # Optional: Human-readable description
nodes: [] # Required: List of nodestriggers: [] # Required: List of triggersvariables: {} # Optional: Flow-level variablesconfig: {} # Optional: Flow configurationEsquema de Nodo
Sección titulada «Esquema de Nodo»nodes: - id: string # Required: Unique node identifier type: string # Required: Node type config: object # Type-specific configuration next: string # Optional: Next node ID on_error: string # Optional: Error handler node ID output: string # Optional: Output variable name timeout: number # Optional: Timeout in millisecondsTipos de Nodo
Sección titulada «Tipos de Nodo»Envía una respuesta de mensaje.
- id: greet type: reply config: message: string # Message text buttons: [] # Optional: Action buttons attachments: [] # Optional: File attachmentsLlama a un LLM.
- id: analyze type: llm config: model: string # Model name (e.g., "gpt-4") prompt: string # User prompt system_prompt: string # Optional: System message temperature: number # Optional: 0-2 (default: 1) max_tokens: number # Optional: Max response tokens output_format: string # Optional: "text" or "json" functions: [] # Optional: Function definitionstemplate
Sección titulada «template»Renderiza una plantilla Handlebars.
- id: format type: template config: template: string # Inline template template_file: string # Or: Path to template file data: object # Optional: Template dataEjecuta un script Rhai.
- id: calculate type: script config: script: string # Inline script script_file: string # Or: Path to script fileRamificación condicional.
- id: route type: branch config: conditions: - expression: string # Condition expression next: string # Target node if true default: string # Default node if no matchAdministra el estado de la sesión.
- id: save type: state config: action: string # "get", "set", "delete" key: string # State key value: any # Value (for "set") output: string # Output variable (for "get")Realiza solicitudes HTTP.
- id: fetch type: http config: method: string # HTTP method url: string # Request URL headers: object # Optional: HTTP headers body: any # Optional: Request body timeout: number # Optional: Timeout in msEmite un evento.
- id: notify type: event config: event_type: string # Event type identifier payload: object # Event payloadadaptive-card
Sección titulada «adaptive-card»Renderiza una Adaptive Card.
- id: show_card type: adaptive-card config: card: string # Card name (from pack) card_json: object # Or: Inline card JSON data: object # Optional: Card datafast2flow
Sección titulada «fast2flow»Enrutamiento por intención.
- id: route type: fast2flow config: config_file: string # Path to fast2flow config fallback_to_llm: bool # Optional: Use LLM for ambiguousflow2flow
Sección titulada «flow2flow»Invoca un sub-flow.
- id: call_sub type: flow2flow config: target_flow: string # Flow to invoke pass_context: bool # Optional: Pass current context input: object # Optional: Input datamcp-tool
Sección titulada «mcp-tool»Ejecuta una herramienta MCP.
- id: query type: mcp-tool config: tool: string # Tool name parameters: object # Tool parametersTriggers
Sección titulada «Triggers»Esquema de Trigger
Sección titulada «Esquema de Trigger»triggers: - type: string # Trigger type target: string # Target node ID # Type-specific fieldsTipos de Trigger
Sección titulada «Tipos de Trigger»message
Sección titulada «message»Se activa con mensajes entrantes.
- type: message pattern: string # Optional: Regex pattern target: startdefault
Sección titulada «default»Trigger general.
- type: default target: fallbackSe activa por eventos.
- type: event event_type: string # Event type to listen for target: handle_eventTrigger programado.
- type: timer cron: string # Cron expression timezone: string # Optional: Timezone target: scheduled_taskcallback_query
Sección titulada «callback_query»Callback de botón (Telegram).
- type: callback_query target: handle_button