# Dify

> Open-source platform to build LLM and RAG apps on a visual canvas

- Category: Retrieval & Knowledge (RAG) / RAG Frameworks & Platforms
- Language: Python
- Repository: https://github.com/langgenius/dify
- Website: https://dify.ai
- Canonical page: https://ai-tldr.dev/tools/dify/

## In short

Dify is an open-source platform for building applications on top of large language models. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python. To get started: check system requirements.

## Overview

Dify is an open-source platform for building applications on top of large language models. It brings together a visual workflow builder, a RAG pipeline, agent tools, model management, and observability so you can move from a prototype to a running app without writing much glue code.

It is aimed at developers and teams who want to assemble LLM features such as chatbots, document Q&A, and agents but prefer a visual canvas over building everything from scratch. It connects to hundreds of proprietary and open-source models from many inference providers, including GPT, Mistral, Llama 3, and any OpenAI API-compatible model.

As a RAG framework, Dify covers the full path from document ingestion to retrieval, with built-in text extraction from PDFs, PPTs, and other common formats. You can self-host it with Docker Compose or use the hosted Dify Cloud.

## What it does

- Visual workflow canvas to build and test AI workflows without hand-wiring each step
- RAG pipeline with out-of-box text extraction from PDFs, PPTs, and other common documents
- Model support for hundreds of proprietary and open-source LLMs, including GPT, Mistral, and Llama 3, plus any OpenAI API-compatible model
- Prompt IDE for crafting prompts, comparing model performance, and adding features like text-to-speech
- Agent capabilities using LLM function calling or ReAct, with 50+ built-in tools such as Google Search, DALL-E, and WolframAlpha
- LLMOps and observability with integrations for Opik, Langfuse, and Arize Phoenix to monitor logs and performance

## Getting started

The easiest way to run Dify is to self-host the server with Docker Compose. Make sure Docker and Docker Compose are installed first.

1. Check system requirements

   Before installing, confirm your machine has at least 2 CPU cores and 4 GiB of RAM.

2. Start the server with Docker Compose

   Clone the repo, switch into the docker directory, copy the example environment file, and bring the stack up in the background.

```bash
cd dify
cd docker
cp .env.example .env
docker compose up -d
```

3. Open the dashboard

   Once the containers are running, open the install page in your browser and complete the initialization to create your first app.

```text
http://localhost/install
```

## When to use it

- Build a chatbot or customer support assistant grounded in your own documents using the RAG pipeline
- Prototype and compare prompts across different models in the Prompt IDE before shipping
- Create agents that call tools like web search or image generation to complete multi-step tasks
- Self-host an internal LLM app platform so teams can build and monitor AI features in one place
