Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Core Concepts of Dify: What Scenarios Are Chatbot, Agent, Workflow, and Knowledge Base Best Suited For

Dify is a unified AI application platform, but different business needs do not all correspond to the same building approach.

At LangGenius, we typically use four core concepts to help teams understand Dify:

  • Chatbot
  • Agent
  • Workflow
  • Knowledge Base

These are not mutually exclusive alternatives but rather capability combinations designed for different types of problems.

1. Chatbot: Best for User-Facing Conversational Entry Points

Chatbot is the most intuitive and most common form of AI application. It is suitable for scenarios that involve conversational interaction with users.

For example:

  • Employee self-service Q&A
  • Customer support assistant
  • Product usage inquiries
  • Basic information collection and response

If your goal is “let users ask questions directly and receive natural language answers,” Chatbot is often the most suitable entry point.

Chatbot Characteristics

  • Intuitive interaction
  • Low barrier to launch
  • Suitable for quickly validating user needs
  • Easy to combine with knowledge bases to create FAQ-type applications

When Chatbot Is More Suitable

  • Primarily Q&A-driven
  • Relatively simple processes
  • Users expect to complete tasks through chat
  • Focus is on experience and responsiveness rather than complex process control

2. Agent: Best for Having AI Proactively Call Tools to Complete Tasks

When an application goes beyond “answering questions” and requires AI to autonomously select tools, execute steps, and integrate results based on objectives, you enter the realm of Agent.

For example:

  • Searching for materials and then generating conclusions
  • Calling external APIs to complete tasks
  • Coordinating across multiple tools to handle complex problems
  • Dynamically deciding the next action based on objectives

Agent Characteristics

  • Emphasizes task completion rather than single-turn answers
  • Can incorporate tool invocation
  • Better suited for open-ended, multi-step problems
  • Suitable for building more autonomous AI applications

When Agent Is More Suitable

  • Task paths are not entirely fixed
  • Tool invocation is required
  • AI needs to determine strategy based on context
  • Users provide goals, not explicit steps

3. Workflow: Best for Business Processes Requiring Explicit Control

Many enterprise scenarios are not suited for full Agent autonomy but instead require predictable, reusable, and governable execution paths. These scenarios are better suited for Workflow.

For example:

  • Classify input content, then retrieve, generate, and review
  • Read a form and perform multi-step judgment with branching
  • Receive text and perform summarization, translation, formatting, and return
  • Chain knowledge retrieval, model generation, and conditional branching into a fixed pipeline

Workflow Characteristics

  • Explicit processes
  • Controllable nodes
  • Easier to troubleshoot and optimize
  • Better suited for formal enterprise business processes

When Workflow Is More Suitable

  • Steps are clearly defined
  • Conditional branching is needed
  • Stable output is required
  • Observability, debuggability, and reusability are needed

If Agent is more like “letting AI figure out how to achieve the goal on its own,” then Workflow is more like “the team defines the process and lets AI execute within it.”

4. Knowledge Base: Best for Enabling AI to Answer Questions Based on Enterprise Knowledge

Knowledge Base is the foundation for building knowledge-driven applications in Dify. Its role is not to replace the model but to enable the model to incorporate the enterprise’s own materials when answering questions.

Common knowledge sources include:

  • PDF
  • Documents and manuals
  • FAQ
  • Web content
  • Product materials
  • Internal policies and documentation

Knowledge Base Characteristics

  • Provides business context for answers
  • Reduces the risk of models generating unconstrained content detached from facts
  • Supports knowledge Q&A, retrieval augmentation, internal assistant scenarios, and more
  • Serves as critical infrastructure for many Chatbots and Workflows

When Knowledge Base Is More Suitable

  • Answers need to be based on existing materials
  • The enterprise has a large volume of document assets
  • Improving the factual grounding and stability of answers is important
  • Building an AI that “understands your business” is the goal

The Relationship Among the Four

The key to understanding Dify is not memorizing these four concepts separately but understanding how they combine.

A common application architecture might look like:

  • Use Chatbot as the front-end entry point
  • Use Knowledge Base to provide retrieval support
  • Use Workflow to organize answer logic
  • Add Agent for tool invocation when needed

In other words, Dify does not just provide “a chatbot” but offers a general framework for building AI applications at different levels.

How to Choose

You can make your decision as follows:

If your core question is:

“I want to let users ask questions directly.”
Prioritize Chatbot.

If your core question is:

“I want AI to execute tasks based on objectives.”
Prioritize Agent.

If your core question is:

“I need a clear, stable, and controllable processing pipeline.”
Prioritize Workflow.

If your core question is:

“I want AI to answer based on my materials.”
Prioritize building a Knowledge Base.

From LangGenius’s Perspective

We want enterprises to understand: AI applications do not come in just one form.

Some problems need a great conversational entry point, some need a controllable process engine, some need a knowledge layer that truly understands business context, and some need the ability to autonomously invoke tools.

Dify’s product design is precisely aimed at ensuring these capabilities are no longer scattered across multiple systems but work together within a single platform.

Conclusion

Chatbot, Agent, Workflow, and Knowledge Base are not abstract terms but the four most common types of capability needs that enterprises encounter when building AI applications.

  • Chatbot addresses the conversational entry point
  • Agent addresses task execution
  • Workflow addresses process orchestration
  • Knowledge Base addresses business knowledge integration

Once a team clearly understands these four concepts, it becomes much easier to determine what their scenario actually needs, where to start, and how to gradually expand a single-point AI capability into a complete enterprise application.