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.

Principle:Langgenius Dify App Type Selection

From Leeroopedia


Knowledge Sources
Domains LLM Application Architecture Interaction Design
Last Updated 2026-02-08 00:00 GMT

Overview

Application archetype selection determines the interaction pattern and runtime behavior of an LLM-powered application by mapping use case requirements to one of several predefined paradigms.

Description

When creating a new AI application, the first and most consequential decision is choosing the application mode. Each mode defines a distinct interaction contract between the user and the language model:

  • Chat (chat) -- A simple conversational interface where the user exchanges messages with the LLM in a turn-based dialogue. The platform manages conversation history automatically. Best suited for customer support bots, Q&A assistants, and general-purpose chatbots that do not require complex orchestration.
  • Advanced Chat (advanced-chat) -- Also known as Chatflow, this mode layers a visual workflow editor on top of the conversational paradigm. Developers can design multi-step processing pipelines (retrieval, transformation, conditional branching) that execute before or after the LLM generates a response. Ideal for RAG-powered chatbots, multi-tool assistants, and applications requiring deterministic pre-/post-processing logic.
  • Agent Chat (agent-chat) -- An autonomous agent mode where the LLM can reason about which tools to invoke, plan multi-step actions, and iterate until a goal is reached. The platform provides a tool-calling loop with observation/action cycles. Appropriate for research assistants, code interpreters, and applications where the LLM must dynamically decide its next action.
  • Workflow (workflow) -- A non-conversational automation mode where the application executes a directed acyclic graph (DAG) of processing nodes. There is no persistent chat session; each run is an independent invocation. Best for batch processing, document generation, data transformation pipelines, and any use case that does not require interactive dialogue.
  • Completion (completion) -- A single-shot text generation mode where the user provides input (typically via a form) and receives a generated output. There is no conversation context or multi-turn interaction. Suitable for text summarization, translation, content generation, and structured output tasks.

The choice of mode is immutable after creation for most modes (though the platform offers a conversion path from basic chat to chatflow). This makes upfront selection critical.

Usage

Select the application type when:

  • Starting a new project and defining the interaction contract
  • Evaluating whether a use case requires autonomous reasoning (agent), orchestrated pipelines (workflow/chatflow), or simple dialogue (chat/completion)
  • Migrating an existing application from one paradigm to another (limited support via conversion utilities)

Theoretical Basis

The five modes map to well-established patterns in AI application design:

Pattern Mode Characteristics
Conversational AI chat Stateful, multi-turn, history-managed
Orchestrated Dialogue advanced-chat Stateful + DAG-based pre/post processing
Autonomous Agent agent-chat Tool-calling loop with planning and reflection
Pipeline Automation workflow Stateless DAG execution, no dialogue
Single-Shot Generation completion Stateless, prompt-in / text-out

The selection heuristic can be expressed as:

IF use_case requires autonomous tool selection:
    mode = agent-chat
ELSE IF use_case requires multi-step orchestration:
    IF use_case involves interactive dialogue:
        mode = advanced-chat
    ELSE:
        mode = workflow
ELSE IF use_case involves multi-turn conversation:
    mode = chat
ELSE:
    mode = completion

Key trade-offs:

  • Complexity vs. control -- Agent mode offers the most flexibility but is the hardest to debug and constrain. Workflow mode offers maximum control but no conversational affordance.
  • Latency -- Workflow and agent modes introduce additional processing steps that increase end-to-end latency compared to simple chat or completion.
  • Cost -- Agent mode may invoke the LLM multiple times per user request (reasoning loops), significantly increasing token consumption.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment