Flow-YAML-Schema
Überblick
Abschnitt betitelt „Überblick“Flows werden in YAML-Dateien mit der Erweiterung .ygtc definiert. Diese Referenz deckt das vollständige Schema ab.
Top-Level-Struktur
Abschnitt betitelt „Top-Level-Struktur“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 configurationKnotenschema
Abschnitt betitelt „Knotenschema“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 millisecondsKnotentypen
Abschnitt betitelt „Knotentypen“Sendet eine Nachrichtenantwort.
- id: greet type: reply config: message: string # Message text buttons: [] # Optional: Action buttons attachments: [] # Optional: File attachmentsRuft ein LLM auf.
- 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
Abschnitt betitelt „template“Rendert ein Handlebars-Template.
- id: format type: template config: template: string # Inline template template_file: string # Or: Path to template file data: object # Optional: Template dataFührt ein Rhai-Skript aus.
- id: calculate type: script config: script: string # Inline script script_file: string # Or: Path to script fileBedingte Verzweigung.
- id: route type: branch config: conditions: - expression: string # Condition expression next: string # Target node if true default: string # Default node if no matchVerwaltet den Sitzungszustand.
- 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")Führt HTTP-Anfragen aus.
- 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 msLöst ein Ereignis aus.
- id: notify type: event config: event_type: string # Event type identifier payload: object # Event payloadadaptive-card
Abschnitt betitelt „adaptive-card“Rendert eine 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
Abschnitt betitelt „fast2flow“Intent-Routing.
- id: route type: fast2flow config: config_file: string # Path to fast2flow config fallback_to_llm: bool # Optional: Use LLM for ambiguousflow2flow
Abschnitt betitelt „flow2flow“Ruft einen Sub-Flow auf.
- 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
Abschnitt betitelt „mcp-tool“Führt ein MCP-Tool aus.
- id: query type: mcp-tool config: tool: string # Tool name parameters: object # Tool parametersTrigger
Abschnitt betitelt „Trigger“Triggerschema
Abschnitt betitelt „Triggerschema“triggers: - type: string # Trigger type target: string # Target node ID # Type-specific fieldsTriggertypen
Abschnitt betitelt „Triggertypen“message
Abschnitt betitelt „message“Wird durch eingehende Nachrichten ausgelöst.
- type: message pattern: string # Optional: Regex pattern target: startdefault
Abschnitt betitelt „default“Auffang-Trigger.
- type: default target: fallbackWird durch Ereignisse ausgelöst.
- type: event event_type: string # Event type to listen for target: handle_eventGeplanter Trigger.
- type: timer cron: string # Cron expression timezone: string # Optional: Timezone target: scheduled_taskcallback_query
Abschnitt betitelt „callback_query“Button-Callback (Telegram).
- type: callback_query target: handle_button