Introduction to Dify
What is Dify?
Dify is an open-source platform for building LLM applications, maintained by LangGenius. In Studio you drag-and-drop agents, agentic workflows, and chatbots grounded on your own data, then publish them as a web app or a REST API (and, if you want, as an MCP server).
Official one-liner: build AI apps on your data, then put them in users' hands. The name Dify comes from Do It For You.
App types (official picture)
When you create an app, current docs recommend Workflow or Chatflow (visual graph, reusable nodes). Three simpler “basic” types still exist:
This tutorial goes Chatbot → knowledge → workflow → agent, the visual twin of the code path in the LangChain tutorial.
Dify vs LangChain vs Coze
All three combine models, tools, and knowledge. The split is who writes the orchestration, where data lives, and whether you can self-host.
When to pick which:
- Ship a knowledge-grounded assistant in days, and let non-engineers edit prompts → Dify
- Fine-grained state, tests, deep Python integration → LangChain (same RAG / agent loop)
- Stay inside a China-cloud bot ecosystem and channels → evaluate Coze; keep data on-prem → self-host Dify
They compose: Dify orchestrates and publishes; an HTTP or code node can call your LangChain service.
Good fit / caveats
Good fit: internal FAQ and policy Q&A (knowledge + citations); fixed classify/generate pipelines (Workflow / Chatflow); tool-using assistants (Agent); one app for both browser users and backends (Web App + API).
Watch out: very complex typed state machines belong in LangChain / LangGraph; ultra-low latency pays a studio/sandbox tax; self-host needs CPU/RAM/disk and real volumes backups (see Installation).
How you run it
Repo: github.com/langgenius/dify. Pair local models with the Ollama tutorial. To expose a Dify app to an IDE, see the MCP tutorial.
A workspace is the unit of sharing: models, knowledge, and apps live together. Only Owner / Admin can add provider keys; everyone else consumes whatever is already configured. Export DSL (YAML) when you copy an app between instances, and keep secrets in environment variables so the file stays safe to share.
Next steps
- Installation
- Quick Start
- Side-by-side: LangChain introduction