Dify
Open-source LLM app platform — build production AI apps with RAG, agents, and workflows.
The go-to open-source LLM platform — Ship AI apps with RAG + agents + workflows without rebuilding infra. Self-hostable, model-agnostic, and Forbes AI 50 listed.
What it is
Dify is an open-source platform for building production-grade AI applications. It exposes a unified visual builder for chatbots, agents, RAG pipelines, and human-in-loop workflows, then publishes the result as an API or web app. Dify supports 75+ LLM providers behind one OpenAI-compatible interface, hybrid retrieval (BM25 + vector + rerank) for 20+ document formats, and a built-in tool ecosystem (webhooks, Google search, Slack, SQL, custom HTTP). Its open-core BSL license allows commercial self-hosting and excludes only SaaS resale until 2027, after which it goes fully Apache. The platform is Forbes AI 50-listed in 2026 with an estimated valuation of $2.1B.
Best for
- Build internal Q&A agents over company wikis / docs / Notion / GitHub
- Customer-support agents with RAG over help center articles
- Multi-step agent workflows (research, summarize, post to Slack / HubSpot)
- Self-hosted AI gateway: one OpenAI-compatible endpoint for all your teams
Pros
- True model-agnostic — OpenAI, Anthropic, Bedrock, Cohere, Hugging Face, Ollama, LM Studio, etc.
- Hybrid retrieval (BM25 + vector + rerank) outperforms pure vector RAG
- Self-host on your own infra (Docker compose) keeps data in-house
- One platform for Chatbot / Agent / Workflow / RAG — no stitching multiple vendors
Cons
- Cloud pricing ($59/mo for 5k messages) is steeper than per-call AI gateways
- BSL license prohibits SaaS resale until 2027 (commercial use OK)
- Self-host setup assumes Docker / K8s / DevOps capacity
Quick start
- Cloud: go to dify.ai → sign up free — 200 message credits on Starter ($59/mo).
- Self-host: clone github.com/langgenius/dify → docker compose up -d (Docker required).
- Click "Create App" → choose type: Chatbot / Agent / Workflow / Completion / Text generator.
- Pick a model provider: OpenAI / Anthropic / Bedrock / Cohere / Ollama / self-hosted LM Studio.
- Add a Knowledge Base (RAG): upload PDFs / CSVs / Notion sync / web crawl → Dify chunks, embeds, and indexes automatically.
- Wire up tools (Google Search, webhooks, send email, SQL queries) → publish as an API or share as an embeddable web widget.
Sample input / output
App: "Internal Q&A Agent for Engineering"
Type: Agent
Model provider: Anthropic Claude Sonnet 4
System prompt: "You answer engineering questions about our repo acme/cloud. Use only the provided Knowledge Base. If unsure, say so explicitly and link to the closest doc."
Knowledge Base:
- 28-day crawl of docs.acme.io
- synced GitHub repo (auto-refresh on PR merge)
- 12 architecture PDFs uploaded manually
Tools enabled:
- Web search (DDG)
- Slack post-message
Channel deployment:
- Slack app: /ask (Slash command)
- Web widget (embed on internal portal)
- API: POST /v1/chat-messages with X-API-Key Production behavior (90 days):
- Total queries: 14,820
- Resolved from KB without hallucination: 12,610 (85%)
- "I don't know, let me search" returns: 1,420 (9.6%)
- Hard escalation to human: 790 (5.3%)
- Slack engagements increased 28%; internal wiki hits dropped 22%
Latency: P50 1.2s, P95 3.8s with Claude Sonnet 4 + hybrid RAG.
Cost: $240/mo Sonnet 4 + $0 self-host on existing 8-core VM.
Operational note: 2% of answers hallucinated outside the KB — added a "post-hoc KB guardrail agent" that re-checks each response and flags suspicious answers for review. Benchmarks
Pricing
Cloud: Sandbox free (limited); Starter $59/mo (5k messages); Pro $159/mo (unlimited). Self-host: free under BSL 1.1.
Underlying models
Self-hosting
Yes — Dify can be self-hosted under the BSL 1.1 (open-core, no SaaS resale until 2027) license. This gives you full control over data and deployment.