Building LLM-powered products used to mean assembling a fragile stack of API wrappers, vector database clients, prompt templates, context management logic, and retry handlers. You'd spend more time writing orchestration boilerplate than building the thing you actually wanted. LangChain helped — then became a different kind of complexity problem. Most alternatives were either too opinionated or not production-ready.
Dify takes a different approach: give developers a visual canvas to wire LLM workflows together, backed by a production-grade infrastructure stack, with the full source available to self-host. It's become the fastest path from "I want to build an AI product" to a working, deployed application — and with 138,000+ GitHub stars and over a million deployed apps, it's clearly resonating.
What Dify is
Dify (short for "Do It For You") is an LLM application development platform that bundles everything needed to ship AI products into a single self-hostable stack: a visual workflow builder, a RAG pipeline, an agent framework, model management for 100+ providers, and LLMOps observability. It launched in March 2023 and has grown to 138,000+ GitHub stars — more than Flowise (~40K) and approaching n8n (~130K) — with over 1 million deployed applications and 180,000+ developers using it.
The core proposition: instead of writing orchestration code, you drag and drop components onto a canvas. Instead of managing separate vector database clients, RAG pipelines, and model provider integrations, you configure them through a UI. And instead of paying for a proprietary AI app platform, you self-host the whole stack on your own infrastructure with zero feature restrictions compared to the cloud version.
The license situation — modified Apache 2.0
Before anything else, the licensing deserves a clear explanation because it's commonly misunderstood and Dify markets itself as "open source" in a way that's technically inaccurate.
Dify uses a modified Apache 2.0 license with additional restrictions — sometimes called the "Dify Open Source License." The community has raised this repeatedly on GitHub, with contributors correctly pointing out that adding restrictions to Apache 2.0 means it no longer qualifies as an OSI-approved open source license. It's more accurately described as source-available.
The two key restrictions:
- Multi-tenant SaaS — you cannot use Dify to operate a multi-tenant environment (where one workspace = one tenant) without written authorization from Dify. In practice this means: building a hosted Dify service for others requires a commercial license.
- Logo and copyright — you cannot remove or modify the Dify logo or copyright notices from the frontend (the
web/directory).
What this means in practice for the overwhelming majority of users: nothing. Self-hosting Dify to build internal tools, chatbots, and AI workflows for your own organization is fully permitted with no restrictions. The license only bites if you're building a competing hosted Dify platform for others or want to strip the branding.
For teams with strict OSI-approved-only procurement requirements, this is a genuine blocker. For everyone else — including DevOps teams building internal AI tooling — the effective experience is identical to a permissive open source license.
Core capabilities
Visual workflow builder
The workflow builder is Dify's centrepiece. You connect nodes on a canvas — LLM calls, knowledge base retrievals, conditional logic, HTTP requests, code execution, variable manipulation — and wire them into a pipeline. What would be dozens of lines of LangChain or LlamaIndex code becomes a visual graph you can reason about and iterate on without touching code.
Node types include: LLM (call any connected model), Knowledge Retrieval (query your RAG knowledge bases), Code (execute Python or JavaScript in a sandbox), HTTP Request (call external APIs), Conditional (branch logic), Template Transform (manipulate strings and variables), Question Classifier, and more. The workflow is the application — you publish it as a chatbot, API endpoint, or embedded widget.
RAG knowledge base pipeline
Upload documents (PDF, Markdown, HTML, Notion pages, web crawls), and Dify handles chunking, embedding, vector storage, and retrieval. The pipeline supports hybrid search combining vector similarity with keyword matching — which outperforms pure vector search for technical content where exact terms matter. Each stage is observable: you can see chunk sizes, embedding models used, retrieval scores, and latency.
Knowledge bases are queryable via API, so your existing applications can use Dify as an external RAG service without going through the full workflow builder. This is particularly useful for adding RAG to existing applications without migrating the entire stack.
Agent framework
Beyond linear workflows, Dify supports autonomous agent loops where the model decides which tools to call based on the task. Agents have access to 50+ built-in tools: web search, code interpreter, image generation, HTTP requests, Wikipedia, weather, and more. You can also add custom tools by pointing at any OpenAPI spec — Dify generates the tool integration automatically.
Multi-agent workflows let you chain specialized agents: one for research, one for writing, one for fact-checking — each with its own system prompt, model, and tool access, coordinated by an orchestrator agent.
Model management — 100+ providers
Dify connects to any LLM through a unified plugin runtime: OpenAI, Anthropic (Claude), Google (Gemini), Mistral, Cohere, Azure OpenAI, AWS Bedrock, and self-hosted models via Ollama or any OpenAI-compatible inference server. You configure credentials once and switch models per workflow or even per node within a workflow.
For teams running local models with Ollama — Llama 3, Mistral, Qwen, or fine-tuned variants — Dify works completely offline. No API costs, no data leaving your network.
LLMOps observability
Production AI applications need visibility into what's happening: token counts, costs, latency per node, retrieval quality, user feedback. Dify logs every request with full trace data — model, prompt, completion, token usage, latency, and cost — and surfaces it in a built-in dashboard. You can annotate responses, build golden datasets for evaluation, and track quality over time. This is the "Ops" in LLMOps: the tooling to actually run and improve AI applications in production.
Self-hosting Dify
Dify's self-hosted stack is more complex than most tools in this blog — it runs eight services. Docker Compose handles it cleanly:
# Clone the repo
git clone https://github.com/langgenius/dify.git
cd dify/docker
# Copy and configure env
cp .env.example .env
# Edit .env: set SECRET_KEY, database passwords, storage settings
# Start everything
docker compose up -dThe full stack includes:
- api — Flask backend, the core application server
- worker — Celery worker for async tasks (document indexing, long-running workflows)
- web — Next.js frontend
- plugin-daemon — model provider and tool plugin runtime
- sandbox — isolated environment for executing model-generated code safely
- db — PostgreSQL for metadata
- redis — queue and cache
- weaviate (or pgvector, Qdrant, Milvus, Chroma) — vector database for knowledge bases
Minimum viable server: 2 CPU cores and 4GB RAM. For production with active knowledge bases and parallel workflows, 4+ cores and 8GB gives comfortable headroom. Put Traefik or Nginx in front for HTTPS.
One practical note: Dify's .env.example is well-documented and the setup is more straightforward than it looks. The Railway template mentioned in the search results shows the full architecture pre-wired if you want a reference.
Dify vs the alternatives
vs Flowise — Flowise is the most direct open source competitor: a visual LangChain workflow builder, MIT licensed (genuinely OSI open source, unlike Dify's modified license), simpler stack, easier to self-host. Dify wins on features — more mature RAG pipeline, better observability, broader model support, multi-agent capabilities. Flowise wins on license clarity and lower operational overhead. For a small team that wants the simplest possible self-hosted visual workflow builder, Flowise is worth considering. For anything production-grade with serious RAG requirements, Dify's feature set pulls ahead.
vs n8n — n8n is a general-purpose automation platform (like Zapier, self-hosted) that added AI/LLM nodes. It's excellent for automations that involve LLMs as one step among many — send an email, parse a PDF, call an API, summarize with GPT. Dify is built specifically for LLM applications end-to-end. They're complementary: n8n for automation workflows with AI assistance, Dify for AI-first applications.
vs LangChain / LlamaIndex — these are code-first frameworks, not platforms. They give you maximum flexibility at the cost of writing and maintaining orchestration code. Dify's visual builder compiles to the same underlying patterns LangChain/LlamaIndex implement in code. Use the frameworks if you need programmatic control and custom components; use Dify if you want to iterate faster and have the platform handle the infrastructure.
vs Langflow — Langflow is a visual LangChain builder (MIT licensed) similar to Flowise. Less mature than Dify, smaller community, but genuinely open source. Worth evaluating if OSI compliance is a hard requirement.
vs hosted LLM app platforms (OpenAI Assistants API, Anthropic, AWS Bedrock Agents) — these lock you to one vendor's models and pricing. Dify self-hosted is model-agnostic and data stays on your infrastructure. The trade-off is operational responsibility; the gain is control, cost, and privacy.
Practical use cases for DevOps teams
Dify is particularly well-suited for the kind of internal tooling DevOps teams actually need:
- Internal documentation chatbot — ingest your runbooks, architecture docs, and wikis into a knowledge base; build a chatbot that answers "how do we rotate secrets in production?" from your actual docs.
- Incident response assistant — a workflow that takes an alert, queries relevant runbooks, retrieves recent similar incidents from your knowledge base, and drafts an initial response.
- Code review summarizer — pipe pull request diffs to a workflow that summarizes changes, flags potential issues, and tags relevant team members.
- Infrastructure Q&A — connect Dify to your Terraform state, deployment logs, or monitoring dashboards via HTTP tool nodes; ask natural language questions about your infrastructure.
- Onboarding assistant — an agent that answers "how do I set up my dev environment" by retrieving from your onboarding docs and walking through steps interactively.
Who it's for
Good fit:
- Teams who want to build LLM-powered internal tools without writing orchestration boilerplate
- Organizations with compliance or privacy requirements where data can't leave their network
- Teams running local models via Ollama who want a production-grade application layer on top
- Developers who want to prototype AI workflows fast and iterate without code changes
- Anyone currently paying for proprietary AI app platforms (OpenAI Assistants, Azure AI Studio)
Not the right fit:
- Teams with strict OSI open source requirements — Flowise or Langflow instead
- Anyone wanting to offer Dify as a multi-tenant hosted service — requires a commercial license
- Simple single-step LLM integrations — a direct API call is simpler than deploying the full stack
- Teams without DevOps capacity to maintain an 8-service Docker stack
My take
Dify is the most complete self-hosted platform for building LLM applications in 2026. The visual workflow builder genuinely accelerates development — what takes a day of LangChain plumbing takes an hour in Dify. The RAG pipeline is production-grade. The model-agnostic architecture means you're not locked into any provider. And the observability story is better than most proprietary alternatives.
The license is worth being honest about: Dify is not genuinely open source despite marketing itself that way. For self-hosting internal tools, this doesn't matter at all in practice. But the community's frustration with the "Apache 2.0 but not really" framing is legitimate — it's the same pattern as BSL tools claiming open source heritage while adding commercial restrictions.
For DevOps teams specifically, the internal tooling angle is compelling. A documentation chatbot powered by your actual runbooks, built on Dify, running on your own server alongside Outline or Plane — that's a genuinely useful addition to your self-hosted stack. The combination of local model support (Ollama) and full data ownership means you can build AI tooling that never touches a third-party API if that's what your security requirements demand.
Start with the Docker Compose setup on a modest VPS. Build a simple knowledge base from your existing docs. See how fast the workflow builder lets you iterate. That's the right way to evaluate whether Dify fits your team's needs.
PIPOLINE · DEVOPS CONSULTING
Need help self-hosting Dify?
Getting Dify into production — Docker Compose, PostgreSQL, Redis, vector database selection, Traefik for HTTPS, Ollama integration for local models, and wiring your first knowledge base from existing documentation — has more moving parts than most self-hosted tools. I can handle the full setup and build your first RAG workflow from your actual runbooks and docs. You get a production-ready AI application platform without spending a week on it.
Get in touch at pipoline.com →
Member discussion