Dify

From PRIMO.ai
Jump to navigation Jump to search

YouTube search... ...Google search


Dify is an AI application development platform from LangGenius that combines visual workflows, model connections, knowledge retrieval, tools, publishing, and operational monitoring. Its name refers to “Do It For You,” reflecting its aim of making generative AI applications easier to build and operate. Users assemble applications around existing large language models rather than training a new foundation model as part of the ordinary application-building process. Dify offers a managed cloud service, a self-hosted Community Edition, and a commercial Enterprise offering.

Dify is useful when an application needs more than a single prompt: retrieving company information, selecting a processing path, calling an external service, requesting human input, and returning a structured result. Its visual environment makes these steps inspectable and editable by people with different levels of programming experience. Developers can extend the same applications with code, APIs, and plugins when a task exceeds the built-in components. This places Dify within no-code and low-code development, while leaving data preparation, integration design, and testing as substantive engineering work.

The platform changes quickly, and its documentation distinguishes established application types from newer capabilities. As of November 1, 2026, the redesigned Agent and Agent Knowledge Base are documented as beta features. Availability and behavior can differ between Dify Cloud, a particular self-hosted release, and an Enterprise deployment, so an implementation should use documentation matching its environment.



Dify turns models, knowledge, tools, and decision rules into inspectable AI applications; dependable results still depend on the quality of the evidence, the boundaries of the workflow, and the tests applied to the complete system.



Platform and Application Types

Workflow Studio: Workflows and Chatflows

Dify’s visual canvas connects nodes that perform individual operations, such as calling a model, searching knowledge, transforming data, or choosing a branch. A Workflow processes an input or event through a defined sequence, making it suitable for document processing, report preparation, and other bounded jobs. A Chatflow adds a conversational interface, running its configured logic for each incoming message. Workflows can begin through user input or supported triggers, while Chatflows begin with a user message.

The distinction concerns interaction and control, rather than the intelligence of the selected model. A support conversation may need a Chatflow because later questions depend on the discussion, while a nightly report is better represented as a Workflow. Both can combine model-driven steps with explicit rules, allowing the builder to decide where flexible interpretation is useful and where predictable execution is required. Workflow and Chatflow documentation

Basic Chatbot, Text Generator, and Legacy Agent

The basic Chatbot offers a simpler conversational application built around a model, instructions, and optional knowledge grounding. It suits question answering and guided exchanges that do not require a multi-step tool workflow. Builders can configure variables and prompts to adapt its behavior to a particular audience or task. Chatbot documentation

The Text Generator handles a single request and response, such as summarizing a passage, translating text, or drafting a description from supplied fields. Its configuration can include input variables, knowledge retrieval, and optional application features. The documentation also retains a legacy Agent application type, which should be distinguished from the newer sandbox-based Agent described below. Text Generator documentation

Agent: Reusable AI Workers

The redesigned Agent, currently documented as beta, separates an agent’s reusable capabilities from the task assigned on a particular run. Builders configure its instructions, model, skills, tools, and supporting files, then use it as a standalone conversational application or invoke it within a larger workflow. Unlike the legacy tool-calling application, the new Agent operates in its own sandbox and can run commands, install programs, and work with files. This makes its execution environment and permissions important parts of the application design.

A workflow can assign an Agent an open-ended subtask while retaining explicit control over the surrounding process. For example, an Agent might investigate supplied material, after which ordinary workflow nodes validate required fields and route the result for review. Conversation memory remains bounded by the model’s context, and a new conversation starts fresh; the presence of an Agent does not imply unlimited or automatically shared memory. Agent documentation

Models, Marketplace, and Integrations

Dify separates application orchestration from the model provider. Cloud users can use supported models through available credits or connect provider accounts, while integrations extend the choice of models and services. This allows applications to use providers such as OpenAI, Anthropic, and Google, with the actual capabilities determined by the selected model and integration. Provider credentials are workspace resources, and calls made with a user-supplied key are billed to that provider account. Model provider documentation

The Dify Marketplace distributes integrations that connect applications to models, tools, and other services. Tool options include installed plugins, imported OpenAPI specifications, reusable Workflows, and external Model Context Protocol (MCP) servers. Current documentation supports connecting MCP tools through HTTP transport; a local process-based MCP server is not automatically interchangeable with that connection method. Plugin permissions, authentication requirements, and maintenance quality remain relevant when choosing components. Dify Tools documentation

Knowledge, Retrieval, and RAG

Classic Knowledge Bases

Dify’s knowledge features support retrieval-augmented generation, in which an application retrieves relevant material and supplies it to a model as context. In a Classic Knowledge Base, builders configure how documents are divided, indexed, and searched. High Quality indexing uses embeddings and supports vector, full-text, and hybrid retrieval, while Economical indexing uses a more limited keyword-based approach. These choices affect retrieval behavior, resource use, and the evidence available to the answering model.

Vector search finds material with similar meaning, while full-text search helps preserve exact terms such as product identifiers and technical names. Hybrid retrieval combines the two, and a reranking model can reorder candidate results before they reach the answer-generation step. Builders should test these settings against representative questions rather than assuming that a larger retrieval set produces a better answer. Indexing and retrieval documentation

Knowledge Pipeline

A Knowledge Pipeline is a configurable document-processing workflow that prepares material for retrieval. Its stages cover acquiring data, extracting content, processing it, and storing searchable knowledge. Builders can begin with a template or construct a pipeline suited to the source material, making data preprocessing an explicit part of the system rather than an invisible upload step.

This matters when documents contain inconsistent formatting, repetitive boilerplate, tables, or information that should remain grouped together. A useful pipeline preserves the context needed to interpret a passage while removing material that interferes with search. The resulting knowledge base still requires retrieval testing and maintenance as its source documents change. Knowledge Pipeline documentation

Agent Knowledge Base

The newer Agent Knowledge Base, currently documented as beta, uses a reasoning model to organize documents and an embedding model to make them searchable. Its retrieval depth controls how extensively the system investigates a question, including following related material across documents at deeper settings. Supported model choices can also enable image indexing and retrieval, making multimodal capability a configuration decision rather than a property of every knowledge base.

The interface supports reviewing indexed documents and testing retrieval with saved “golden questions.” These questions provide a repeatable check that important information remains retrievable after changes to documents or settings. This more automated approach reduces some manual configuration, but users still need to check whether extracted content and retrieved evidence are correct. Agent Knowledge Base documentation

The Mechanism: From Request to Result

A Dify application can be understood as a sequence of data transformations and decisions. Inputs become variables, nodes consume selected variables, and their outputs become available to later steps. Model calls interpret or generate content, while other nodes handle explicit conditions, formatting, external requests, and result delivery. The builder’s task is to make the dependencies clear enough that unexpected inputs and failed services have defined outcomes.

Component Function Example
LLM Calls a configured model. Summarize retrieved passages using a specified output structure.
Question Classifier and If-Else Route inputs through model-based classification or explicit conditions. Separate a product question from an account-access request.
Knowledge Retrieval Supplies relevant source material. Retrieve the current return policy before drafting an answer.
Iteration and Loop Process collections or repeat a sequence. Analyze each document, or refine an output within configured limits.
Code Runs custom Python or JavaScript transformations. Validate fields, normalize dates, or calculate totals.
HTTP Request and Tool Connect to external services. Retrieve an order’s current status from an authenticated API.
Human Input Pauses execution for a person’s response. Request approval before proceeding with a proposed action.
Answer and Output Return conversational content or workflow results. Display a supported answer or return structured data to a calling application.

The Code node supplies a practical bridge between visual configuration and conventional software development. It runs Python or JavaScript with declared inputs and outputs, allowing precise transformations where a model would be unnecessary or unreliable. Its sandbox and available libraries should be treated as execution constraints, and failures can be handled through configured retries or fallback paths. Code node documentation

The Human Input node pauses a workflow and presents a form with information, requested fields, and decision options. Its configuration includes delivery method and timeout behavior, allowing approval or clarification to become an explicit branch in the process. Email delivery uses a response link that anyone possessing it can answer, and the request closes after the first response, so reviewers and delivery channels should be chosen deliberately. Human Input documentation

Publishing, Monitoring, and Portability

Dify applications can be delivered through hosted web interfaces, website embeds, APIs, and supported MCP publishing options. This lets a team begin with the provided interface and later connect the application to an existing website or business system. The publication method should match the audience, authentication requirements, and expected interaction pattern. Dify Cloud publishing options

Publishing an application as an MCP server allows compatible assistants and development tools to call it. This is separate from importing external MCP tools into Dify: one exposes a Dify capability, while the other makes an external capability available inside an application. Dify’s generated MCP server address contains authentication credentials and must be protected like an API key. MCP publishing documentation

Built-in monitoring tracks measures such as conversation volume, active users, interaction depth, and token consumption. Integrations with observability services such as Langfuse and LangSmith provide additional tracing, while capture settings determine whether detailed Agent activity and message content are sent onward. Operational visibility supports LLMOps, but usage and token charts do not establish that answers are accurate. Teams need separate evaluation criteria for correctness, evidence quality, and task completion. Monitoring documentation

Current Cloud documentation describes exporting applications as .ifpkg app packages, an important difference from older tutorials centered on YAML DSL files. An export is not a complete environment backup: linked knowledge bases, credentials, logs, and several tool and integration dependencies are excluded. Secret-type environment-variable values can optionally be included in some exports, in which case they are written as plain text. Migration therefore requires checking dependencies and handling secrets deliberately, rather than assuming an exported application is immediately runnable elsewhere. Export and import documentation

Deployment and Licensing

Offering Deployment approach Main consideration
Dify Cloud Managed service operated by Dify. Fast setup, with plan-specific usage, storage, collaboration, and retention limits.
Community Edition Self-hosted software distributed through the public repository. Infrastructure operation, upgrades, backups, and security become the operator’s responsibility.
Dify Enterprise Commercial deployment and management options for organizations. Additional identity, governance, deployment, and support capabilities depend on the purchased offering.

Dify Cloud offers Sandbox, Professional, and Team plans, with different allowances for applications, knowledge storage, members, and other resources. Platform subscriptions and model-provider charges are distinct cost components, particularly when a workspace uses its own provider keys. Plan names, included credits, and quotas should be checked on the live pricing page when estimating an implementation. Dify pricing

Community Edition provides access to the source and self-hosting, including a Docker-based deployment path. Its license is derived from Apache 2.0 but adds conditions concerning multi-tenant operation and removal or modification of frontend branding and copyright information. Commercial use is permitted subject to those terms, so neither “unrestricted Apache 2.0” nor “noncommercial use only” accurately describes the published license. Dify license

Dify Enterprise advertises private deployment options, SSO, role-based access control, audit capabilities, and Kubernetes deployment support. These features can support organizational AI governance and enterprise architecture requirements, but the exact scope should be established for the selected deployment. Self-hosting the orchestration platform also does not, by itself, keep all application data local: external model APIs, tools, and tracing destinations remain part of the data flow. Dify Enterprise

Practical Applications and Examples

The examples below are implementation patterns, not claims that Dify supplies a finished product for every business function. Each combines platform components with an organization’s own data, permissions, and operating rules. A useful first project has a narrow task, identifiable source material, and a result that a person can evaluate.

Customer Support and Internal Knowledge

A support Chatflow can classify a question, retrieve relevant policy material, and generate an answer grounded in that material. Dify’s official customer-service tutorial demonstrates the knowledge-base approach, providing a starting point for question answering over organizational data. A production design should additionally define what happens when no relevant policy is found, the question concerns a restricted account, or the user asks for an action beyond the assistant’s authority. Customer service tutorial

Document Intake and Review

A document workflow can extract content, identify required fields, and apply explicit checks before producing a summary or review package. For example, a purchasing team could compare a supplied quotation with a checklist and route missing information to a reviewer. This combines document understanding, classification, and summarization, while keeping numerical validation and acceptance criteria separate from generated prose. The practical test is whether reviewers can trace each reported finding to the supplied document.

Research and Reporting

A research assistant can retrieve internal material, call approved external search tools, and prepare a report with source links. Multiple steps allow a workflow to separate evidence collection from synthesis and final review. A useful design records which sources were actually retrieved and distinguishes their claims from the model’s interpretation. For recurring reporting, a scheduled Workflow can begin the process automatically, with human review before distribution where appropriate.

Connecting AI to Business Systems

An application can use an authenticated tool to retrieve an order, create a draft record, or prepare an update for another system. The important design choice is the permitted operation: reading a status is different from issuing a refund or changing an account. Explicit input validation, limited tool permissions, and approval steps help make this boundary visible. Such designs connect AI application development with business-process automation without assuming that every task requires an autonomous agent.

Getting Started

  1. Choose one measurable task. Define the intended user, accepted inputs, desired output, and conditions requiring escalation.
  2. Select a deployment. Use Cloud for a managed start, or follow the repository’s installation guidance for an appropriate self-hosted release.
  3. Configure the required models. Select generation, embedding, and reranking models according to the application’s actual needs.
  4. Choose the simplest suitable application type. Begin with a Chatbot or Text Generator when sufficient, and use Workflow, Chatflow, or Agent capabilities when the task requires them.
  5. Prepare a small, trusted knowledge collection. Check extraction and retrieval before expanding the document set.
  6. Add tools with limited permissions. Verify authentication and expected responses independently before relying on model-directed tool use.
  7. Test complete runs. Include ordinary requests, missing information, conflicting documents, tool failures, and attempts to obtain unauthorized information.
  8. Publish to a limited audience. Review outcomes, costs, and failure cases before increasing access or adding consequential actions.
  9. Maintain the application. Retest after changes to models, prompts, integrations, documents, or the Dify version.

The Physics: Constraints and Failure Modes

Context is finite, and retrieval is selective. A model only receives the material included in its current context, which may omit relevant documents or earlier conversation details. Retrieval can fail because the source is missing, extraction damaged it, the search missed it, or the ranking favored a less useful passage. Evaluating the retrieved evidence separately from the generated answer helps identify which stage needs improvement.

More steps create more opportunities for delay and failure. A sequence that performs search, reranking, multiple model calls, and external tool requests accumulates their execution time and dependencies. Loops and repeated retries can also multiply cost without improving the result. Builders should establish stopping conditions and measure useful task completion rather than treating a longer chain of reasoning as an achievement.

Instructions do not replace authorization. Retrieved documents, website content, and tool responses can contain material that attempts to redirect an application, making prompt injection relevant to connected AI systems. A well-written prompt helps define behavior, but access to records and permission to perform actions should also be enforced by the surrounding application and services. Testing should include attempts to cross those boundaries, not only examples that follow the intended workflow.

Visibility does not guarantee correctness. A trace can show that an application executed the planned nodes while its final answer is still incomplete or unsupported. Verification and validation therefore need criteria such as source support, extraction accuracy, appropriate abstention, and successful completion of the intended task. Privacy review should also consider documents, prompts, logs, exports, and external integrations as parts of one system.

Why This Matters

Dify gives teams a shared representation of how an AI application works. Domain specialists can inspect prompts and decision paths, while developers can handle integrations, custom logic, and deployment requirements within the same project. This can shorten the distance between a working experiment and an application that users can actually access. The benefit is greatest when visual development is accompanied by clear ownership of data, permissions, and evaluation.

The platform also provides a useful setting for comparing different levels of autonomy. A deterministic workflow, a conversational assistant, and an Agent are different design choices, even when they use the same underlying model. Teams can reserve flexible reasoning for ambiguous tasks and retain explicit rules for operations that require predictable behavior. This supports a more deliberate AI adoption strategy than treating every business process as an unrestricted agent problem.

History and Recent Developments

Dify’s public materials trace its early development to 2023, when it presented a visual approach to creating and operating LLM applications. Its product scope subsequently expanded toward workflows, retrieval, extensibility, and enterprise operation. This history helps explain why older tutorials may use different navigation, application terminology, and export formats from current documentation.

Recent Developments

  • February 2025: plugin-centered architecture. Dify’s v1.0 announcement introduced its plugin architecture, Marketplace, and Agent node, allowing models, tools, and agent strategies to evolve more independently of the core platform. Dify v1.0 announcement
  • Current workflow capabilities: event-driven execution and human participation. Documentation covers schedule, webhook, and integration triggers, together with Human Input steps for pausing and directing execution. These support applications that combine automatic processing with explicit review.
  • Current beta capabilities: redesigned Agent and Agent Knowledge Base. Documentation updated in October 2026 describes sandbox-based Agents and more automated document organization and retrieval. Their beta status remains relevant when evaluating stability and deployment availability.
  • Current application portability: app packages. Cloud documentation now describes .ifpkg export and import, including dependency exclusions and optional secret handling. Older DSL-based instructions should be checked against the version being used.

Further Resources

Additional Viewing

Dify Quickstart Guide: Build Your First AI Workflow is Dify’s approximately 10-minute demonstration of a country-information chatbot using LLM, Code, and Answer blocks. It illustrates the node-based construction discussed in “The Mechanism,” showing how model output and explicit processing can contribute to one application.

Is Dify the easiest way to build AI Applications? is Matt Williams’s approximately 14-minute walkthrough of self-hosting, model configuration, tools, and visual application building. It complements the deployment and integration sections, but its 2024 interface and setup details should be compared with current documentation before use.

References