# AI use cases for Dify (langgenius/dify)

Repo: [langgenius/dify](https://github.com/langgenius/dify) | Use cases: 3 | Page: https://dedupedai.com/use-cases/langgenius-dify/

Dify is an open-source platform for building LLM apps. It combines a visual workflow canvas, a RAG pipeline that ingests PDFs and slides, agents with their own sandbox, support for hundreds of models, a prompt IDE, observability and a backend-as-a-service API, so a team can go from prototype to production in one workspace. It runs in Dify Cloud or self-hosted with Docker Compose.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Self-host Dify with Docker Compose: https://dedupedai.com/use-cases/langgenius-dify/self-host-dify-with-docker-compose/
- Build a chatbot over your PDFs and slides: https://dedupedai.com/use-cases/langgenius-dify/build-a-docs-chatbot-with-the-rag-pipeline/
- Give a Dify agent tools from MCP servers and the marketplace: https://dedupedai.com/use-cases/langgenius-dify/run-a-sandboxed-dify-agent-with-mcp-tools/

## How to self-host Dify with Docker Compose with Dify

Repo: [langgenius/dify](https://github.com/langgenius/dify) | Difficulty: Beginner | Time: 20 minutes | Basis: From the README

Copy the env file, start the stack, and finish setup in the browser.

**Who it is for:** A team that wants an LLM app platform on its own server for data control.

**The problem:** Building chat, RAG and workflow plumbing from scratch takes weeks.

**The outcome:** A running Dify dashboard at localhost/install where you create the admin account.

### Steps

1. Clone the repo, then `cd dify` and `cd docker`
2. Run `cp .env.example .env`
3. Start it with `docker compose up -d`
4. Open http://localhost/install and complete initialization
5. Add your model provider keys in settings

### Prompt to paste into your agent

```text
Self-host langgenius/dify with Docker Compose on this server, confirm all containers are healthy, and tell me which values in .env I should change before exposing it to my team.
```

### Caveat



Risk, credentials: Model provider keys are stored in the Dify instance; restrict access before sharing it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/langgenius-dify/self-host-dify-with-docker-compose/

## How to build a chatbot over your PDFs and slides with Dify

Repo: [langgenius/dify](https://github.com/langgenius/dify) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Upload documents to a knowledge base and wire a chat app that answers from them.

**Who it is for:** A team lead who wants staff to ask questions of policies, manuals or decks.

**The problem:** People cannot find answers buried in long PDFs and slide decks.

**The outcome:** A chat app that answers from your documents through Dify's RAG pipeline.

### Steps

1. Create a knowledge base and upload PDFs, PPTs or other documents
2. Let the RAG pipeline extract text and index it
3. Create a chat app and attach the knowledge base
4. Tune the prompt in the Prompt IDE and compare models side by side
5. Publish it, or call it from your own app through the API

### Prompt to paste into your agent

```text
In my langgenius/dify instance, create a knowledge base from <documents>, build a chat app that answers only from it and says when it does not know, and give me its API endpoint.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/langgenius-dify/build-a-docs-chatbot-with-the-rag-pipeline/

## How to give a Dify agent tools from MCP servers and the marketplace with Dify

Repo: [langgenius/dify](https://github.com/langgenius/dify) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Describe an agent, connect tools or MCP servers, and use it as a chat app or a step inside a workflow.

**Who it is for:** A builder who wants an agent that can run commands and use tools without risking the host.

**The problem:** Agents that touch files and software need a safe place to run.

**The outcome:** An agent with its own sandbox and the tools you chose, callable from chat or a workflow.

### Steps

1. Create an agent and describe what it should do
2. Give it skills and connect tools from Dify Marketplace, MCP servers or your own APIs
3. Test it as a chat app
4. Drop it into a workflow as one step and watch runs in the observability view

### Prompt to paste into your agent

```text
Build a langgenius/dify agent that <task>, connect the <MCP server or tool>, test it in chat, then add it as a step in a workflow that <workflow>. List every tool it can call.
```

### Caveat



Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/langgenius-dify/run-a-sandboxed-dify-agent-with-mcp-tools/
