Key Takeaways
- License is not plain Apache 2.0 β the "Dify Open Source License" adds a clause barring unauthorized multi-tenant SaaS deployments and a logo/branding retention requirement
- Community Edition (self-hosted) is free, open source, and single-workspace via Docker
- Dify Cloud is a paid managed option with a free Sandbox tier and per-workspace annual pricing
- Dify Enterprise adds SSO/SAML, RBAC, SOC 2 Type II and ISO 27001 compliance for self-hosted or VPC deployment
- RAG (Knowledge Pipeline) and agent tool-calling are both first-class, not add-ons β the same canvas builds either
- 50+ built-in tools ship for agents (search, image generation, code execution, and more), plus provider integrations for hundreds of LLMs
π In One Sentence
Dify is an open-source platform that combines a visual AI workflow builder, a RAG knowledge pipeline, and an agent framework, released under a modified Apache 2.0 license that restricts running it as a multi-tenant SaaS without written permission.
π¬ In Plain Terms
Instead of separately wiring up a document search system, a chatbot, and an agent framework, Dify puts all three behind one drag-and-drop canvas that you can self-host or run as a paid cloud service.
πNote: If you plan to resell Dify-hosted app access to your own customers as a multi-tenant service, read the license section below first β that use case needs a commercial agreement with LangGenius.
What Is Dify?
Dify is an open-source platform for building and deploying LLM applications β chatbots, document-search assistants, and multi-agent systems β through a visual interface rather than assembling separate libraries for orchestration, retrieval, and agent logic. The project is maintained by LangGenius and hosted at github.com/langgenius/dify, where it has passed 154,000 GitHub stars.
- Workflow Studio: a node-based visual builder for chaining prompts, retrieval steps, tool calls, and conditional logic into a working application
- Knowledge Pipeline (RAG): document ingestion, chunking, embedding, and indexing that feeds retrieval into an agent or workflow
- Agents: built through conversation or manual configuration, deployable standalone, embedded on a website, or as a node inside a larger workflow
- Model management: connects to hundreds of proprietary and open-source LLMs across dozens of inference providers, including any OpenAI-API-compatible endpoint
- 50+ built-in tools for agents (web search, image generation, code execution, and similar), extendable through marketplace integrations and MCP
- Publishing options: deploy an app as a web app, a REST API, an embeddable chat widget, or an MCP-compatible tool, with execution monitoring
Dify License: What the Modified Apache 2.0 Restricts
Dify is not released under plain Apache License 2.0. The repository uses what LangGenius calls the "Dify Open Source License" β an Apache 2.0 base with additional terms layered on top. This is the fact most reviews gloss over, and it changes how you can legally deploy Dify in specific scenarios.
The additional terms add two restrictions that plain Apache 2.0 does not have. First, you may not use the Dify source code to operate a multi-tenant environment without explicit written authorization from LangGenius β meaning you cannot take the open-source code and resell it as your own hosted, multi-customer SaaS product without a commercial agreement. Second, you may not remove or modify the Dify logo or copyright information shown in the console or in applications built with it.
- Permitted: self-hosting Dify internally for your own team or organization, on your own infrastructure
- Permitted: using Dify as a backend service inside your own application, including commercial products, without a multi-tenant resale model
- Permitted: modifying, forking, and redistributing the source code under the same license terms
- Restricted without written authorization: operating Dify's source code as a multi-tenant SaaS platform β i.e., reselling hosted Dify access to multiple separate customers as your own service
- Restricted at any time: removing or altering the Dify logo/copyright notice in the console or in apps built on it
β οΈWarning: Do not assume "open source" means "Apache 2.0 with no strings attached." Read LICENSE in the langgenius/dify repository before building a multi-tenant product on top of the self-hosted code.
Community vs. Cloud vs. Enterprise
Dify ships in three forms, and the right one depends on who is hosting the infrastructure and how much support you need.
Community
- Hosting:
- Self-hosted (Docker)
- Cost:
- Free
- Workspace limit:
- 1 workspace
- Best for:
- Internal teams, developers, self-managed infrastructure
Dify Cloud β Sandbox
- Hosting:
- Managed (LangGenius)
- Cost:
- $0/year
- Workspace limit:
- 1 workspace, 1 member
- Best for:
- Evaluation and small personal projects
Dify Cloud β Professional
- Hosting:
- Managed (LangGenius)
- Cost:
- $590/year per workspace
- Workspace limit:
- 1 workspace, 3 members
- Best for:
- Small teams that want zero infrastructure setup
Dify Cloud β Team
- Hosting:
- Managed (LangGenius)
- Cost:
- $1,590/year per workspace
- Workspace limit:
- 1 workspace, 50 members
- Best for:
- Larger teams needing more apps and storage
Enterprise
- Hosting:
- Self-hosted or VPC
- Cost:
- Custom (contact sales)
- Workspace limit:
- Multiple workspaces
- Best for:
- Organizations needing SSO/SAML, RBAC, SOC 2, ISO 27001
Dify Cloud plan limits also cover message credits, app count, knowledge-base document count, and storage β the Sandbox tier includes 200 message credits, 5 apps, and 50 knowledge documents; Professional includes 5,000 message credits/month, 50 apps, and 500 knowledge documents; Team includes 10,000 message credits/month, 200 apps, and 1,000 knowledge documents. Check dify.ai/pricing directly before committing, since usage limits change independently of the headline price.
RAG and Knowledge Base Features
Dify's Knowledge Pipeline handles the retrieval-augmented generation (RAG) side: turning files, websites, and documents into a searchable knowledge base an agent or workflow can query at runtime.
- Ingestion: upload files or connect data sources; the pipeline extracts text, cleans it, and prepares it for indexing
- Chunking and indexing: documents are split into retrievable segments and embedded for semantic search
- Knowledge base as a component: any workflow or agent can attach one or more knowledge bases as a retrieval step
- Document-count limits scale by plan β the free Community/Sandbox tiers cap knowledge documents lower than paid Cloud tiers or self-hosted Enterprise deployments
Agents and Tool Calling
Agents in Dify can be built two ways: through a conversational setup flow, or by manually wiring tools, knowledge bases, and logic onto the canvas. Either way, the resulting agent can run standalone, be embedded in a website, or act as one node inside a larger multi-step workflow.
- Tool calling: agents call external APIs, run code, query databases, or use any of the 50+ built-in tools (web search, image generation, and similar) shipped with the platform
- MCP support: Dify's marketplace integrates Model Context Protocol tools and data sources alongside its native tool library
- Workflow orchestration: conditional branching, multi-step logic, and chaining an agent step with a RAG retrieval step or another agent
- Publishing: a finished agent deploys as a web app, an API endpoint, an embeddable widget, or an MCP-compatible tool with execution monitoring
How Do You Self-Host Dify?
Self-hosting the Community Edition runs the full platform on infrastructure you control, using Docker Compose β the officially documented quick-start method.
- 1Install Docker and Docker Compose if you do not already have them, on Linux, macOS, or Windows with WSL2.
- 2Clone the repository: git clone https://github.com/langgenius/dify.git, then cd dify/docker.
- 3Copy the example environment file: cp .env.example .env, and review the values before starting the stack.
- 4Start the stack: docker compose up -d. This launches the API server, web frontend, and supporting services.
- 5Open http://localhost/install in a browser to complete the first-run setup and create an admin account.
- 6Add at least one LLM provider (an API key for a proprietary model, or a connection to a locally running OpenAI-API-compatible endpoint) before building your first workflow.
Does self-hosted Dify need a GPU?
No, not for the platform itself. Dify orchestrates calls to LLM providers β it does not run model inference. A GPU is only relevant if you separately self-host the LLM Dify is calling (for example, through a local inference server).
Can I run Dify entirely offline with local models?
You can point Dify at any OpenAI-API-compatible local inference endpoint, which lets a self-hosted Dify instance route requests to a locally hosted model with no calls to external LLM providers, as long as every connected tool and integration is also kept local.
Who Should Use Dify?
Dify fits teams that want one platform covering workflow orchestration, RAG, and agents together, rather than assembling separate tools for each layer.
Dify vs. Flowise, LangChain, LlamaIndex
Dify overlaps with visual builders like Flowise on the workflow canvas, and with code-first frameworks like LangChain and LlamaIndex on RAG and agent capability β the difference is how much of the stack ships in one product.
| Tool | Interface | License | Best For |
|---|---|---|---|
| Dify | Visual + RAG + agents | Modified Apache 2.0 | All-in-one LLMOps platform |
| Flowise | Visual drag-and-drop | Apache 2.0 | Existing self-hosted setups |
| LangChain | Python / JS code | MIT | Full custom control |
| LlamaIndex | Python / TS code | MIT | Data-heavy RAG pipelines |
Common Mistakes When Evaluating Dify
These mistakes come from treating Dify like a plain-Apache-2.0 tool, or confusing its bundled scope with a narrower single-purpose tool.
Frequently Asked Questions
Is Dify free?
The self-hosted Community Edition is free and open source. Dify Cloud has a free Sandbox tier plus paid Professional and Team tiers billed per workspace, per year. Dify Enterprise is custom-priced.
What license does Dify use?
A modified Apache 2.0 license LangGenius calls the "Dify Open Source License." It adds two restrictions beyond plain Apache 2.0: you cannot operate the source code as a multi-tenant SaaS without written authorization, and you cannot remove or modify the Dify logo or copyright notice in the console or apps built with it.
Can I use Dify commercially?
Yes, for internal use or as the backend of your own commercial product. Reselling hosted, multi-customer access to the open-source code as your own SaaS is the one scenario that needs a separate written agreement with LangGenius.
Does Dify support RAG?
Yes. The Knowledge Pipeline ingests documents and websites, chunks and indexes them, and lets any workflow or agent query the resulting knowledge base as a retrieval step.
Does Dify support AI agents?
Yes. Agents can be built conversationally or manually configured, and can call external APIs, run code, or use any of the 50+ built-in tools shipped with the platform, including MCP-based tools.
How is Dify different from Flowise?
Flowise is primarily a visual workflow canvas for LangChain/LangGraph constructs. Dify bundles a similar visual builder together with a first-party RAG pipeline, agent framework, model management, and observability in one platform, rather than leaving RAG and deployment to separate tools.
How is Dify different from LangChain or LlamaIndex?
LangChain and LlamaIndex are code-first frameworks β you write Python or TypeScript to define retrieval and agent logic. Dify is a platform with a visual builder on top of similar capability, trading some programmatic flexibility for faster visual iteration and built-in deployment and hosting.
Can I self-host Dify without a GPU?
Yes. Dify orchestrates calls to LLM providers rather than running inference itself, so the platform has no GPU requirement of its own. A GPU only matters if you are separately self-hosting the LLM that Dify calls.
What does Dify Enterprise add over Community?
Dify Enterprise adds SSO/SAML authentication, role-based access control (RBAC), multiple workspaces, and SOC 2 Type II and ISO 27001 compliance, deployed self-hosted or in your own VPC with vendor support.
What models does Dify support?
Dify connects to hundreds of proprietary and open-source LLMs across dozens of inference providers, including any endpoint compatible with the OpenAI API β which covers many self-hosted local inference servers.
