Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Workflow:Langgenius Dify Visual Workflow Builder

From Leeroopedia


Knowledge Sources
Domains LLMs, Workflow_Orchestration, AI_Applications
Last Updated 2026-02-08 14:00 GMT

Overview

End-to-end process for building, testing, and publishing visual AI workflows using the Dify drag-and-drop workflow editor with 28+ node types.

Description

This workflow covers the complete lifecycle of building AI workflows in Dify's visual graph editor. Users compose workflows by dragging processing nodes onto a canvas and connecting them with edges. Nodes include LLM calls, code execution, HTTP requests, knowledge retrieval, conditional branching, iteration loops, and more. Workflows support draft/publish versioning, real-time execution monitoring via server-sent events, variable management (environment, conversation, and system variables), and parallel branch execution.

Usage

Execute this workflow when you need to build a multi-step AI process that goes beyond simple prompt-response patterns. Use it for complex orchestrations involving conditional logic, multiple LLM calls, external API integrations, data transformations, or iterative processing. Choose Workflow mode for automation tasks or Chatflow mode for multi-turn conversational applications with visual flow control.

Execution Steps

Step 1: Workflow Initialization

Create a new Workflow or Chatflow application (or open an existing one). The editor loads with a start node that defines trigger inputs. For Chatflow, the start node includes conversation memory configuration. Choose between Workflow (single-run automation) and Chatflow (multi-turn conversation with memory).

Starting points:

  • Create new Workflow or Chatflow application
  • Open existing workflow in draft mode
  • Import workflow from DSL file

Step 2: Node Composition

Drag nodes from the palette onto the canvas and connect them by drawing edges between node ports. Each node type handles a specific processing task. Configure node parameters including inputs, outputs, and node-specific settings.

Available node types:

  • LLM — Call language models with prompt templates and variable injection
  • Code — Execute Python or Node.js code for data transformation
  • HTTP Request — Call external APIs with configurable method, headers, and body
  • Knowledge Retrieval — Query connected knowledge bases with semantic or hybrid search
  • IF/ELSE — Conditional branching based on variable values or expressions
  • Iteration — Loop over list items with a sub-graph executed per item
  • Loop — Conditional looping with configurable exit criteria
  • Question Classifier — Route conversations based on intent classification
  • Parameter Extractor — Extract structured data from unstructured text using LLMs
  • Template Transform — Apply Jinja2 templates for text formatting
  • Variable Assigner — Set or update workflow variables
  • Variable Aggregator — Merge outputs from parallel branches
  • Tool — Call built-in, custom, or MCP tools
  • Agent — Invoke autonomous agent sub-workflows
  • Document Extractor — Parse content from uploaded documents
  • List Operator — Filter, sort, and transform list data
  • Answer/End — Define workflow output or conversation response

Step 3: Variable Management

Configure the three levels of variables that control data flow. Environment variables hold configuration constants. Conversation variables persist state across multiple runs in Chatflow mode. System variables provide runtime context like user ID and conversation ID.

Variable types:

  • Environment Variables — Static configuration values stored with the workflow definition
  • Conversation Variables — Persistent state across chat turns (Chatflow only) supporting string, number, array, and object types
  • System Variables — Read-only runtime context (user ID, conversation ID, timestamps)
  • Node Variables — Outputs from individual nodes referenced by downstream nodes

Step 4: Draft Testing and Node Debugging

Test the workflow during development using the draft execution mode. Run the entire workflow or test individual nodes in isolation. Monitor execution in real-time through the tracing panel, which shows node-by-node progress, inputs, outputs, token usage, and elapsed time.

Testing capabilities:

  • Full workflow draft execution with real-time event streaming
  • Single node test runs with isolated input/output inspection
  • Iteration and loop node step-by-step debugging
  • Node tracing with inputs, outputs, token counts, and timing
  • Variable inspector for examining current state at any point

Step 5: Publishing and Version Control

Promote the working draft to a published version. Each publish creates a version snapshot with optional name and comment metadata. Version history supports pagination and user-filtered views. Published workflows can be accessed via API or web app.

Version control features:

  • Draft-to-publish promotion with conflict detection via content hashing
  • Named version snapshots with optional comments
  • Paginated version history with user filtering
  • Ability to view and compare previous versions

Step 6: Execution Monitoring

Monitor published workflow runs through the run log interface. Each execution produces a detailed trace with per-node timing, token usage, inputs, outputs, and error information. Nested execution contexts (iterations, loops, parallel branches) show hierarchical trace trees.

Monitoring data:

  • Workflow run history with status, elapsed time, and total tokens
  • Per-node execution traces with inputs and outputs
  • Nested traces for iterations, loops, and parallel branches
  • Error details with retry information and error handling strategies
  • Agent-specific action logs for tool calls and reasoning steps

Execution Diagram

GitHub URL

Workflow Repository