Open-source LLM app builder · build chatbots, agents & workflows on a visual canvas · RAG knowledge bases · 50+ model providers · published as chat URL, widget, or Service API
What it is: a Studio for assembling production LLM apps by drag-and-drop instead of code. You upload PDFs/web pages, Dify chunks & embeds them into a managed knowledge base, and your app answers grounded with citations. Get started free: Dify Cloud Sandbox = $0 (200 message credits, 50 MB / 50 knowledge documents). Self-host via Docker (~4 GB RAM, free under Apache 2.0). The course instance dify.32dots.de is currently paused — use Dify Cloud or a self-host. Pro plan: $59/mo.
Agent vs Workflow — the one axis that separates them is control: in a Workflow you fix the path; in an Agent the model picks the path. All three app types publish the same three ways (see below).
| Node | What it does |
|---|---|
Knowledge Retrieval | Fetches the grounded chunks most relevant to the input from a knowledge base |
LLM | Generates text (e.g. writes the answer using retrieved chunks) |
Question Classifier | Sorts an input into categories so you can branch on its type |
If/Else | Branches on a condition (e.g. route long vs short questions) |
Iteration | Loops the same step over every item in a list |
Parameter Extractor | Pulls structured fields out of free text |
Template | Formats output |
Code | Runs your own Python or Node.js |
Tools | Calls an external capability (built-in or connectable) |
Every node's output is typed and visible in the run trace, so when an answer is wrong you can see exactly which node produced it — the opposite of one opaque prompt.
| Step | Do this |
|---|---|
| 1 | In the Studio, Create App → Workflow. |
| 2 | Add a Knowledge Retrieval node, point it at a knowledge base you built. |
| 3 | Add an LLM node; connect the retrieval output into it so the model answers from the retrieved chunks. |
| 4 | Add a Question Classifier near the start (e.g. factual lookup / open discussion) to send each class down a different path. |
| 5 | Add an If/Else node to branch further if needed, then run with a test input. |
| 6 | Watch the run trace light up each node in order; confirm an answer comes out the end. Publish. |
| Step | Do this |
|---|---|
| 1 | In the Studio, open the Knowledge section and create a new knowledge base. |
| 2 | Add sources — Dify ingests PDFs, documents, and web-page URLs into the same base. |
| 3 | Dify chunks each source, embeds it, and the document count rises (Sandbox: up to 50 documents). |
| 4 | Attach the base to a Chatbot, Agent, or a Workflow's Knowledge Retrieval node — the same base is shared across every app. |
| 5 | Ask a cross-source question; the answer cites the chunk it retrieved. |
RAG = retrieval-augmented generation. The app doesn't "know" your docs — at question time it retrieves the most relevant chunks and feeds them to the model; the citation you see is that chunk. Curating what goes in (keeping it on-topic) is the single biggest lever on answer quality. Swap the model any time from the app's model selector — OpenAI, Anthropic, Groq, local Ollama/LM Studio and dozens more — without touching the knowledge base or instructions. Configure providers once in settings; then any app can use them.
Publish and Dify gives a public chat URL to share with collaborators instantly.Dify exposes its own Service API — these are not the OpenAI chat-completions endpoints. You build the app in the GUI; the API only calls the app you built, carrying its knowledge base and instructions with it. Authenticate with the app's secret key as a Bearer token. Base URL: https://api.dify.ai (or your self-host's URL).
| Endpoint | Use for |
|---|---|
POST /v1/chat-messages | Chatbot / Agent apps — sends query, supports multi-turn via conversation_id |
POST /v1/completion-messages | Text-completion apps — sends only inputs, no conversation turn |
curl -X POST 'https://api.dify.ai/v1/chat-messages' \
--header 'Authorization: Bearer {YOUR_APP_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
"inputs": {},
"query": "What is the main finding of this paper?",
"response_mode": "streaming",
"conversation_id": "",
"user": "abc-123"
}'
Leave conversation_id empty to start a new conversation; pass the id returned by the first call to continue the thread. response_mode is streaming or blocking. user is your own end-user identifier.
Pick the right app type: fixed sequence of steps → Workflow; the path depends on what the model finds → Agent; just grounded Q&A → Chatbot. Stress-test a knowledge base by asking one question whose answer IS in the corpus and one that clearly is NOT — note whether it cites, admits it doesn't know, or guesses; that tells you if you'd trust it for real work. Reshape behaviour in plain language, not code — edit the instructions (e.g. "answer in three bullet points for a first-year student, and always name the source"), re-publish, and grounding survives the rewrite. Watch your limits: the Sandbox's 200 message credits go fast in a classroom — swap to a local model (Ollama / LM Studio) to keep data on-prem and cost at zero.