dify
Visual AI workflow builder with RAG, agents, and self-hosting
Replaces Relevance Ai, Stack Ai, Coze

Who it's for
Teams that need to prototype and ship AI-powered internal tools (document search, data extraction, query routing) without building a custom stack. Dify's visual canvas lets backend engineers define workflow logic while product teams adjust prompts in the UI without code changes. The backend API exposes every workflow as an endpoint for integration into existing internal systems.
Your requirements are strictly code-first and your whole team is technical. A Python-native orchestration library gives more granular control with less infrastructure overhead.
Developers who need to ground LLM responses in internal documentation, wikis, or data exports. Dify's RAG pipeline handles ingestion, chunking, indexing, and retrieval in a configurable flow, with quality testing before the knowledge base connects to a chat interface or workflow node.
Your documents are already in a structured database with a clean query layer. Dify's pipeline adds most value on unstructured content where extraction and chunking are non-trivial.
Organizations in healthcare, finance, or regulated industries where data cannot leave the network. Dify's self-hosting path lets you run the full AI application stack inside your own VPC or on-premise infrastructure, using internal LLM endpoints if needed. The Enterprise tier adds SOC 2 Type II compliance and audit log support.
You have no compliance constraints and are comfortable delegating infrastructure to a managed service. Dify Cloud or a simpler hosted AI platform saves setup and maintenance time.
Product managers and designers who need to adjust the behavior of a customer-facing AI app without filing engineering tickets. Dify's prompt IDE and workflow canvas let non-engineers modify prompts, review production logs, and test chatbot behavior, with the full execution trace visible in the LLMOps view.
Your chatbot uses a fixed prompt with no workflow branching or retrieval. A dedicated hosted chatbot builder is a lighter fit for simple, single-prompt interfaces.
The problem
Building AI-powered applications involves more than calling an LLM API. Teams need to manage document retrieval, prompt versioning, agent workflows, model switching, and production observability. Each concern is a separate project if you start from scratch: a vector store for RAG, a job runner for batch pipelines, a tracing layer for debugging, and a way for non-engineers to update prompts without touching code. Paid AI orchestration platforms handle this complexity but introduce vendor lock-in and per-execution pricing that becomes expensive at volume. Teams working under compliance constraints face a related problem: their data cannot leave the organization's network, which rules out most managed services. The result is either a slow and fragile custom build or a cloud dependency the organization cannot afford or cannot accept on security grounds.
How it works
Build multi-step AI workflows on a node-based canvas where each step (prompt, tool call, conditional branch, knowledge retrieval, human-in-the-loop gate) is a visible block. Individual nodes can be tested in isolation, and the full execution path is visible in production logs. Teams can hand workflows off to non-technical members for prompt iteration without code changes.
Ingest documents from files, websites, online documents, or connected drives through a configurable extraction, chunking, and indexing pipeline. Test retrieval quality before connecting the knowledge base to an agent or workflow. Out-of-box support covers PDFs, PowerPoint files, and other common document formats.
Connect to models from OpenAI, Anthropic, Google, Mistral, Llama, DeepSeek, and any OpenAI API-compatible endpoint. Models are configured per workspace and can be assigned per-node in a workflow, so different steps can use different models for cost and quality tradeoffs without restructuring the app.
Build agents that call external tools, run commands, access files, and use MCP integrations sourced from the Dify Marketplace. Define agents by chatting with the system or configuring them manually, then reuse them as nodes inside larger workflows or publish them as standalone apps.
Log application runs, track latency, collect user feedback, and annotate outputs in the Dify interface. Use production data to identify prompt failures and refine datasets over time. Integrates with third-party observability tools including Opik, Langfuse, and Arize Phoenix.
Every workflow, agent, or knowledge base in Dify is accessible via a REST API. Publish apps as hosted web interfaces, API endpoints, embedded widgets, or MCP-compatible tools, and integrate them into existing business logic without building a separate backend service.
Features
- Visual Workflow Canvas
- RAG Pipeline Builder
- 100+ Model Providers
- Agent Runtime with Tool Use and MCP
- LLMOps Monitoring
- Backend-as-a-Service API
How to install
Dify deploys via Docker Compose; the setup requires 2 CPU cores, 4 GB RAM, and Docker Compose v2.24.0 or later.
git clone https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
docker compose up -dRecommended for this setup
Strengths
- Single Docker Compose Deploy: The Community Edition runs from Docker Compose with a single command sequence. Teams with existing Docker infrastructure can stand up a full AI application platform in minutes without configuring multiple separate services. Prerequisites are 2 CPU cores, 4 GB RAM, and Docker Compose v2.24.0 or later.
- Model-Agnostic Architecture: Support for hundreds of models from dozens of providers means no lock-in to a single LLM vendor. Teams can swap models per workflow node, run open models on their own hardware, and adjust cost and quality tradeoffs without rewriting application logic or migrating to a new platform.
- 156,000+ Stars and Active Maintenance: With 156,551 GitHub stars, 24,690 forks, and commits pushed as recently as September 2026, Dify has one of the largest communities in the LLMOps category. The project tracks Linux Foundation health metrics and maintains an open issue tracker with active engineering work.
- Full AI Stack in One Workspace: Workflow, RAG pipeline, agents, model management, plugins, and LLMOps are in one workspace. Teams do not need to stitch together separate tools for each layer of an AI application. Apps built in Dify can be published as a hosted UI, an API, an embedded widget, or an MCP tool from the same interface.
Trade-offs
- Fair-Code License Limits Multi-Tenant Use: The Community Edition is Apache-2.0-based with additional terms. Operating a multi-tenant environment (one workspace serving multiple tenants as a hosted service) requires a separate commercial license from the producer. Removing or modifying the Dify logo or copyright from the frontend is also prohibited. Self-hosting for internal use, including commercial internal applications, is explicitly permitted.
- Minimum 4 GB RAM for Self-Hosting: Docker Compose deployment requires at least 2 CPU cores and 4 GB RAM. Running concurrent agents or large document ingestion pipelines will push resource usage above that baseline. Teams on entry-level VPS instances should plan for a server upgrade before running Dify in production.
- Initial Setup Requires Docker Familiarity: While the visual canvas simplifies prompt and workflow iteration, the initial self-hosting setup requires Docker knowledge, environment variable configuration from a copied .env file, and basic server administration. Organizations without a technical operator will find onboarding significantly steeper than a managed cloud service.
Tech stack
FAQ
The Community Edition is free to self-host and use for internal commercial applications. It is available under the Dify Open Source License, based on Apache-2.0 with additional terms: multi-tenant hosting (serving multiple customers from one workspace) requires a separate commercial license. Dify Cloud has a free tier; paid plans scale with team size, storage, and usage.
Langchain is a Python library for code-first AI application development with no built-in UI. Dify is a visual canvas-based platform where workflows, agents, and RAG pipelines are built as configurable node graphs, with a built-in frontend, monitoring, and a REST API layer. Engineers who prefer pure code and full programmatic control use Langchain; teams that need non-engineers to contribute to prompt logic or inspect production behavior use Dify.
Yes. The Community Edition deploys via Docker Compose with a minimum of 2 CPU cores and 4 GB RAM. After cloning the repo and running docker compose up, the Dify interface is accessible at localhost/install for initial setup. Enterprise features including SSO, RBAC, and a Kubernetes Helm chart require the Enterprise tier.
Dify supports hundreds of models from providers including OpenAI, Anthropic, Google, Mistral, Llama, DeepSeek, and any OpenAI API-compatible endpoint. Models are configured at the workspace level and can be assigned per-node in a workflow, so different steps in the same pipeline can use different models for cost and quality tradeoffs.
Partially. The visual canvas and prompt IDE are designed for non-engineers to adjust AI logic and review production data without writing code. The initial self-hosting setup requires Docker knowledge and server administration. Teams without a technical operator can use Dify Cloud, which removes the infrastructure requirement entirely.