Dify
Open-source LLM application development platform with visual workflow orchestration and RAG.
Why consider Dify?
Dify is an open-source platform for building Agentic workflows and RAG pipelines, deployable on cloud or self-hosted.
Learn Dify by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide4 sections
Building Agentic Workflows with Dify
Dify is an open-source platform designed for building Agentic workflows and RAG pipelines. By combining model management, tool integration, and knowledge bases into one collaborative workspace, it allows teams to transition from prototyping to production without needing to rebuild their software stack. This guide explores how to set up Dify and understand its primary capabilities for orchestration.
Understanding the Dify Architecture
When developing LLM-driven applications, managing context, API connections, and retrieval pipelines often requires disparate tools. Dify unifies these operations. It provides a visual builder that helps developers connect different models to their custom knowledge bases and external APIs.
The system is built to support a variety of deployments. You can deploy it in a VPC, self-host it on your own infrastructure, or use the hosted cloud version. Because Dify abstracts away the complexities of prompt engineering and context chunking, you can focus on testing the actual agent behavior rather than writing boilerplate integration code.
RAG (Retrieval-Augmented Generation) pipelines are a core feature of Dify. By uploading documents—such as PDFs, text files, or markdown—the platform automatically handles document parsing, embedding generation, and vector storage. When a user queries the application, Dify searches this vector knowledge base, retrieves the most relevant chunks, and injects them into the prompt before passing it to the language model. This process ensures the generated answers are grounded in your specific private data rather than just the model's general training knowledge. It dramatically reduces hallucinations and improves the overall reliability of your AI workflows.
Prerequisites and Initial Setup
To begin using Dify on your own hardware, you need a system running Docker 19.03 or later and Docker Compose 2.24.0 or later. It is recommended to have at least 2 vCPUs and 8 GB of memory for a stable environment.
The quickest way to get started is by deploying the provided Docker Compose stack. This stack includes all necessary services such as the core API, worker nodes, database, Redis, and an Nginx reverse proxy.
Deploying Dify Locally
According to the official documentation, you can start Dify locally using Docker Compose, which requires copying an example environment file before bringing up the containers. First, clone the source repository:
git clone https://github.com/langgenius/dify.gitcd dify/dockercp .env.example .envdocker compose up -dOnce the containers are downloading and starting, you can monitor their status. All core services must be running for the application to function correctly. You can verify that all containers are healthy by running:
docker compose psAfter the services are up, the Dify dashboard is exposed via the web server. You can navigate to your local host address in a web browser to complete the administrator account initialization.
Next Steps in Your Agentic Workspace
With the environment running, you can start defining workflows. Dify's visual interface allows you to create nodes for LLMs, knowledge retrieval, and custom API calls. By linking these nodes, you create a directed acyclic graph (DAG) that dictates how the agent processes user input, retrieves relevant context from your documents, and generates a response.
This pipeline can then be exposed as a standard REST API, allowing you to seamlessly integrate the intelligent agent into your existing web or mobile applications.
Related tools
More options with a similar category or technology profile.
marimo
A reactive Python notebook that is reproducible, git-friendly, and executable as a script.
JupyterLab
The next-generation web-based user interface for Project Jupyter computational notebooks.
Trafilatura
Python package and command-line tool designed to gather text and metadata on the Web.
ScrapeGraphAI
Python scraper library that uses LLMs and direct graph logic to extract website data.