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 Application Creation

From Leeroopedia


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

Overview

End-to-end process for creating, configuring, debugging, and deploying an LLM-powered application on the Dify platform.

Description

This workflow covers the complete application lifecycle in Dify, from selecting an app type (Chatbot, Agent, Chatflow, Workflow, or Text Generator) through prompt engineering, model configuration, knowledge base integration, feature toggles, debug/preview testing, and final deployment via web app or API. It also covers DSL import/export for portable application definitions.

Usage

Execute this workflow when you want to create a new AI-powered application on Dify. You should have at least one LLM provider configured in your workspace and optionally a knowledge base if you need RAG capabilities. Choose this workflow whether building from scratch, from a template, or importing an existing DSL configuration.

Execution Steps

Step 1: App Type Selection

Choose the application type that matches your use case. Each type provides different interaction patterns and capabilities. Chatbot and Agent are conversational, Workflow and Chatflow are visual graph-based, and Text Generator is single-turn completion.

App types:

  • Chatbot — Multi-turn conversational interface with simple prompt configuration
  • Agent — Autonomous reasoning with tool use, supporting ReAct and Function Calling modes
  • Chatflow — Workflow-enhanced multi-turn chat with visual node editor and memory
  • Workflow — Visual automation builder for complex multi-step AI processes
  • Text Generator — Single-turn completion for articles, summaries, translations

Step 2: App Initialization

Create the application either from a blank slate, from a pre-built template (categorized by use case: Agent, Assistant, Workflow, Writing, Programming, HR), or by importing a DSL file (YAML format) from a URL or local file. Set the app name, icon, and description.

Initialization options:

  • Start from Blank with custom name and icon
  • Start from Template by browsing categorized examples
  • Import from DSL file (YAML content or URL) with version compatibility checking

Step 3: Model and Prompt Configuration

Configure the LLM provider, model selection, and prompt engineering. Set the system prompt that defines the AI's behavior, configure model parameters (temperature, top_p, max_tokens), and define user input variables for dynamic content.

Configuration areas:

  • LLM provider and model selection
  • System prompt / pre-prompt with variable insertion
  • Model parameters (temperature, top_p, max_tokens, etc.)
  • Opening statement and suggested questions
  • User input form with text, paragraph, and select variable types

Step 4: Feature Configuration

Enable optional features that extend the application's capabilities. Features include knowledge base integration for RAG, conversation history management, content moderation, citation display, audio support (speech-to-text and text-to-speech), file upload, and annotation replies for cached high-quality responses.

Available features:

  • Knowledge base binding with retrieval settings
  • Conversation opener and suggested follow-up questions
  • Citation and attribution display
  • Audio upload, speech-to-text, text-to-speech with voice selection
  • File and image upload with vision model support
  • Content moderation and sensitive word filtering
  • Annotation reply caching with similarity threshold

Step 5: Debug and Preview

Test the application in the built-in debug panel before publishing. Use multi-model comparison to evaluate responses across different LLMs. Verify prompt behavior, variable handling, and knowledge base retrieval quality. Run batch tests for systematic evaluation.

Debug capabilities:

  • Interactive chat preview with the configured model
  • Multi-model side-by-side comparison
  • Variable and prompt template validation
  • Knowledge base retrieval result inspection
  • Batch testing for systematic evaluation

Step 6: Deployment and API Access

Publish the application for end users through multiple channels. Generate a hosted web app URL with customizable branding, enable API access with key management, or embed the app in external websites via iframe or script tag. Configure access control, rate limiting, and custom domain settings.

Deployment options:

  • Web App — Hosted URL with QR code, custom branding, and access control
  • API Access — REST API with secret key management (chat, completion, workflow endpoints)
  • Embedded Widget — iframe or JavaScript snippet for third-party websites
  • Custom Frontend — Fork the Dify web client and deploy to any hosting provider
  • Chrome Extension — Dify Chatbot browser extension integration

Step 7: Monitoring and Optimization

Monitor application performance through the overview dashboard and log viewer. Track active users, token consumption, conversation counts, and satisfaction rates. Use conversation logs with annotation capabilities to continuously improve responses. Configure tracing providers for detailed execution analysis.

Monitoring capabilities:

  • Usage analytics dashboard (daily messages, users, token costs)
  • Conversation and completion log viewer with filtering
  • Message annotation and feedback tracking
  • Tracing integration (Langfuse, LangSmith, MLflow, Phoenix, Opik, and others)

Execution Diagram

GitHub URL

Workflow Repository