# Dify: features, protocols, quickstart

## TL;DR

Dify is a self-hostable LLM application platform from LangGenius with a visual canvas for workflows, chat apps, RAG pipelines and agents. Several agents can be placed as nodes in one workflow, and a beta Agent type gives each agent its own sandbox. It suits teams building internal AI apps without writing a backend.

## Key facts

| Field | Value |
| --- | --- |
| Type | Platform |
| Languages / SDKs | Python, TypeScript, JavaScript |
| License | unknown |
| Pricing model | [Open core](https://dify.ai/pricing) |
| Orchestration pattern | Graph |
| GitHub stars | 157,574 (as of 2026-09-30) |
| GitHub forks | 24,852 |
| Last push | 2026-09-30 |
| Latest release | 1.17.1 |
| Repository | [langgenius/dify](https://github.com/langgenius/dify) |
| Website | [dify.ai](https://dify.ai/) |
| Documentation | [docs.dify.ai](https://docs.dify.ai/) |
| Last verified | 2026-09-30 |

## Key features

- Workflow apps run once per input and Chatflow apps run the flow on every chat message; both use the same node canvas, and Workflow apps can also start from schedule, webhook or integration triggers. ([source](https://docs.dify.ai/en/self-host/use-dify/build/workflow-chatflow))
- Nodes run in series or in parallel branches, and Iteration and Loop nodes repeat sub-flows; one execution path is capped at 50 nodes by default (MAX_TREE_DEPTH). ([source](https://docs.dify.ai/en/self-host/use-dify/build/orchestrate-node))
- The classic Agent node gives a model control over a set of tools using a Function Calling or ReAct strategy, with a max-iterations limit and a token-buffer memory window. ([source](https://docs.dify.ai/en/self-host/use-dify/nodes/agent))
- The beta Agent type is configured once (model, prompt, skills, files, tools) and works in its own sandbox where it can run commands, install programs and write files; it can run as a chat app or be invited into a workflow node. ([source](https://docs.dify.ai/en/self-host/use-dify/build/new-agent/overview))
- In Build mode an agent can be created by describing it in chat; it writes its own skills, files and environment variables and keeps a build_note.md that it re-reads in later sessions. ([source](https://docs.dify.ai/en/self-host/use-dify/build/new-agent/build))
- The Human Input node pauses a run and sends a form by web app or email; the reviewer's button choice picks the next branch. ([source](https://docs.dify.ai/en/self-host/use-dify/nodes/human-input))
- MCP servers that use HTTP transport can be connected in the workspace and their tools used by workflows and agents. ([source](https://docs.dify.ai/en/self-host/use-dify/workspace/tools))
- Any app can be published as an MCP server from its Access Point tab, with a generated URL that carries its own credential. ([source](https://docs.dify.ai/en/self-host/use-dify/publish/publish-mcp))

## Architecture and orchestration pattern

Pattern: Graph.

A Docker Compose install runs Dify as several services: an API server, workers, a web frontend, a plugin daemon, code sandboxes and a separate agent backend, with Postgres, Redis and a vector store (Weaviate by default). Apps are created in the web console as Workflow, Chatflow, Agent or older basic app types, and each app exposes a Service API.

Workflows are node graphs. Nodes can run in sequence or in parallel branches that later converge, and Iteration and Loop nodes repeat a sub-flow. Dify has no separate supervisor or handoff primitive; a multi-agent design is a workflow with several Agent nodes, each receiving its task and upstream variables and returning declared outputs to later nodes. The docs point to this layout when a task needs a set order, branching, or several specialized agents passing work along.

Memory depends on the agent type. The classic Agent node keeps a configurable window of earlier messages (TokenBufferMemory). A beta Agent keeps memory per conversation, limited by the model's context window, and two workflow nodes that invite the same agent each start from its saved setup in separate sandboxes. Files and tools added while building the agent persist; anything created during a published run is temporary. Knowledge bases built with knowledge pipelines supply retrieval context, and run logs record each session.

### Human in the loop

The Human Input node stops a Workflow or Chatflow at a chosen point and sends a form either to the web app user or by email (recipients need no Dify account). The form can show upstream outputs, let the reviewer edit a pre-filled draft, and collect text, a choice or files; each action button (for example Approve or Regenerate) leads to its own branch. The request closes after the first response and times out after 3 days by default, following a timeout branch if one is connected. External clients can fetch and submit the form through the Service API. When building a beta Agent in Build mode, changes the agent proposes are listed as a draft that a person applies or discards, and published versions can be restored.

## Protocols

| Protocol | Support | Evidence | Note |
| --- | --- | --- | --- |
| MCP | Yes (checked 2026-09-30) | [link](https://docs.dify.ai/en/self-host/use-dify/publish/publish-mcp) | Server and client: any Dify app can be published as an MCP server, and the linked Tools page documents importing tools from MCP servers, limited to servers with HTTP transport. |
| A2A | Unknown (checked 2026-09-30) | — | Not mentioned in the docs llms.txt indexes (self-host and developer resources) or README; GitHub code search for a2a in langgenius/dify returned only YAML and lockfile strings, and agent2agent returned nothing. |
| AG-UI | Unknown (checked 2026-09-30) | — | Not mentioned in the docs indexes or README; GitHub code search for ag-ui in langgenius/dify returned nothing, and Dify is not in the AG-UI README integration list. |

## Best for

- Teams that want to chain several agents with branches, loops and review forms on a visual canvas.
- Running an LLM app platform on your own servers with Docker Compose, using the free single-workspace Community Edition. ([shortlist](https://multiagentguide.top/best/self-hosted-local.md))
- Support chat apps that answer from a document knowledge base, as in the official customer service bot tutorial. ([shortlist](https://multiagentguide.top/best/customer-support.md))
- Exposing a workflow to other tools as an MCP server or a REST endpoint.
- Agents that need to run shell commands and handle files in a sandbox.

## Not for

- Operating Dify as a multi-tenant service for your own customers without a commercial license from LangGenius.
- Separating mutually untrusted users on the Community Edition agent runtime; the docs say it is not a hardened isolation boundary.
- Code-first teams that want an agent library inside their own process rather than a separate server.

## Quickstart

```sh
git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git
```

Install not yet verified by this site.

```bash
# Self-host the Community Edition (Docker Compose 2.24.0+, at least 2 CPU / 4 GiB RAM)
git clone --branch "$(curl -s https://api.github.com/repos/langgenius/dify/releases/latest | jq -r .tag_name)" https://github.com/langgenius/dify.git
cd dify/docker
cp .env.example .env
docker compose up -d
# Create the admin account at http://localhost/install, then build a Workflow app
# with two Agent nodes (researcher -> writer), publish it and create an API key.

# Run the published workflow through the Service API.
DIFY_API_BASE="http://localhost/v1"   # use the API base URL your instance shows
curl -X POST "$DIFY_API_BASE/workflows/run" \
  -H "Authorization: Bearer $DIFY_APP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs": {"topic": "MCP adoption"}, "response_mode": "blocking", "user": "demo-user"}'
```

### Common pitfalls

- Needs Docker Compose 2.24.0 or later and at least 2 CPU cores and 4 GiB RAM; on macOS give the Docker VM at least 2 vCPUs and 8 GiB.
- The clone command needs `git`, `curl` and `jq`; if it fails with `Remote branch null not found`, pass an explicit version from the releases page.
- The beta Agent and new Agent node are on by default in Docker Compose; for production replace `DIFY_AGENT_SERVER_SECRET_KEY` and `DIFY_AGENT_API_TOKEN`. The new Agent node works in Workflow apps only.
- Variables handed to a new Agent node are truncated at 2,000 characters; pass long content as a file.
- Only MCP servers with HTTP transport can be imported as tools, and a published MCP server URL embeds a credential (regenerate it if leaked).
- `inputs` and `user` are required on `/workflows/run`; blocking calls to Dify Cloud time out at 100 s behind Cloudflare, so long runs should stream.

Official quickstart: https://docs.dify.ai/en/self-host/deploy/quick-start/docker-compose

## Pros

- Branching, parallel paths, loops and human review are built-in node types, so agent steps sit inside a controlled flow. ([source](https://docs.dify.ai/en/self-host/use-dify/build/orchestrate-node))
- Beta agents get their own sandbox to run commands and handle files, beyond the tools configured for them. ([source](https://docs.dify.ai/en/self-host/use-dify/build/new-agent/overview))
- Human Input forms can go to people without Dify accounts by email and support in-place edits and branch-selecting buttons. ([source](https://docs.dify.ai/en/self-host/use-dify/nodes/human-input))
- Apps can be published as MCP servers and can import tools from HTTP MCP servers. ([source](https://docs.dify.ai/en/self-host/use-dify/publish/publish-mcp))
- A free self-hosted Community Edition and a free Sandbox cloud plan are offered alongside paid plans. ([source](https://dify.ai/pricing))

## Cons

- The Dify Open Source License adds conditions to Apache 2.0: running a multi-tenant service needs written permission, and the logo and copyright in the console and apps may not be removed. ([source](https://github.com/langgenius/dify/blob/main/LICENSE))
- The new Agent and new Agent node are in beta, and the node is available in Workflow apps only. ([source](https://docs.dify.ai/en/self-host/use-dify/nodes/agent))
- The docs warn that the Community Edition agent runtime is not a hardened security boundary between mutually untrusted users. ([source](https://docs.dify.ai/en/self-host/use-dify/build/new-agent/overview))
- Only MCP servers with HTTP transport can be connected as tool sources. ([source](https://docs.dify.ai/en/self-host/use-dify/workspace/tools))
- The Community Edition is limited to a single workspace; multiple workspaces, SSO and a commercial license are Enterprise features. ([source](https://dify.ai/pricing))

## Alternatives

- [n8n](https://multiagentguide.top/tools/n8n.md)
- [Langflow](https://multiagentguide.top/tools/langflow.md)
- [AnythingLLM](https://multiagentguide.top/tools/anything-llm.md)
- [AutoGPT](https://multiagentguide.top/tools/autogpt.md)

## FAQ

### Does Dify support MCP?

Yes. Any Dify app can be published as an MCP server, and workflows and agents can use tools imported from MCP servers, as long as those servers use HTTP transport.

### Is Dify free and open source?

The code is under the Dify Open Source License, which is Apache 2.0 plus extra conditions (no multi-tenant service without permission, no removing the frontend logo). The self-hosted Community Edition is free; Dify Cloud has a free Sandbox plan and paid Professional and Team plans, and Enterprise is priced on request.

### How do multiple agents work together in Dify?

By placing several Agent nodes in a Workflow app. Each node gets a task and upstream variables and returns declared outputs; branches, parallel paths and loops come from the workflow canvas, not from a supervisor agent.

### Can Claude Code or Codex use Dify apps?

The docs offer a difyctl skill file that coding agents such as Claude Code, Codex and OpenCode can load to run Dify apps from the command line, and published MCP servers can be added to MCP clients. Dify does not run or drive those agents itself, so no harness is listed.

### Does Dify support A2A or AG-UI?

No official support was found in the docs, README or repository code on 30 September 2026.

## Sources

- [Dify GitHub repository](https://github.com/langgenius/dify)
- [Dify homepage](https://dify.ai/)
- [Dify documentation](https://docs.dify.ai/)
- [Dify pricing](https://dify.ai/pricing)
- [LICENSE (Dify Open Source License)](https://github.com/langgenius/dify/blob/main/LICENSE)
- [Workflow & Chatflow](https://docs.dify.ai/en/self-host/use-dify/build/workflow-chatflow)
- [Orchestration logic](https://docs.dify.ai/en/self-host/use-dify/build/orchestrate-node)
- [Agent node](https://docs.dify.ai/en/self-host/use-dify/nodes/agent)
- [Agent overview (beta)](https://docs.dify.ai/en/self-host/use-dify/build/new-agent/overview)
- [Build an Agent](https://docs.dify.ai/en/self-host/use-dify/build/new-agent/build)
- [Human Input node](https://docs.dify.ai/en/self-host/use-dify/nodes/human-input)
- [Dify Tools (MCP tab)](https://docs.dify.ai/en/self-host/use-dify/workspace/tools)
- [Publish as MCP server](https://docs.dify.ai/en/self-host/use-dify/publish/publish-mcp)
- [Knowledge pipeline](https://docs.dify.ai/en/self-host/use-dify/knowledge/knowledge-pipeline/readme)
- [Customer service bot tutorial](https://docs.dify.ai/en/learn/tutorials/customer-service-bot)
- [Deploy with Docker Compose](https://docs.dify.ai/en/self-host/deploy/quick-start/docker-compose)
- [Code node](https://docs.dify.ai/en/self-host/use-dify/nodes/code)
- [Run Workflow API](https://docs.dify.ai/en/api-reference/workflow-runs/run-workflow)
- [Install the difyctl skill](https://docs.dify.ai/en/cli/integrate-agents/install-the-difyctl-skill)
- [Local source code start](https://docs.dify.ai/en/self-host/deploy/advanced-deployments/local-source-code)

## Unknown fields

license: GitHub reports NOASSERTION, so the field is 'unknown'. The LICENSE file is the Dify Open Source License, a modified Apache License 2.0 that requires a commercial license for multi-tenant operation and forbids removing the logo or copyright from the frontend (the web/ directory or web image); contributors also agree the producer may change the license. protocols.a2a and protocols.agui: searched the docs llms.txt indexes, README, GitHub code search in langgenius/dify and the AG-UI README integration list; nothing official found. pricing_model is set to open-core as the closest value: the free Community Edition is source-available under a modified license rather than plain Apache 2.0, with paid Cloud plans and a paid Enterprise edition.

Corrections or removal requests: support@multiagentguide.top

---

Data as of 2026-09-30. Not affiliated with listed projects. HTML version: https://multiagentguide.top/tools/dify
