dify
БесплатноБез исполняемых скриптовНе проверенDify is an open-source platform for building LLM apps such as chatbots, agents, workflows and RAG knowledge bases, and it exposes every published app as a…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Dify — Self-hosted LLM app platform with a REST API
Overview
Dify combines a visual workflow builder, agents, model management and RAG knowledge bases in one web console. People design apps in the browser; an agent works with Dify from the terminal by deploying the Docker Compose stack, editing its environment files, calling the Service API of published apps and knowledge bases, moving app definitions (DSL YAML) between instances with difyctl, and handling upgrades and backups.
Instructions
Installation
# Clone the latest release tag (needs git, curl, jq)
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 version # must report 2.24.0 or later
docker compose up -d
docker compose ps
Every container should be Up or healthy; init_permissions exits after it has set storage permissions, which is expected. If the clone fails with Remote branch null not found, the GitHub API call was rate limited: pass the tag directly, for example --branch 1.17.1.
The first administrator account is created in a browser at http://localhost/install. That step, adding model provider credentials, and creating API keys are done by a person in the console. Ask the user to do them and to hand over keys through environment variables.
Configure the deployment
Essential settings live in docker/.env. Optional, provider-specific settings have templates under docker/envs/; copy one without the .example suffix to activate it. Values in docker/.env override the envs/*.env files.
| Variable | Default | Purpose |
|---|---|---|
EXPOSE_NGINX_PORT / EXPOSE_NGINX_SSL_PORT |
80 / 443 |
Host ports of the bundled Nginx |
NEXT_PUBLIC_SOCKET_URL |
ws://localhost |
Browser WebSocket endpoint; change it together with the host or port |
INIT_PASSWORD |
empty | Password (30 characters at most) required on /install before the admin account can be created |
SECRET_KEY |
empty | Signs sessions and file URLs; empty means a persistent key is generated in storage |
DB_PASSWORD, REDIS_PASSWORD |
difyai123456 |
Change before the first start; CELERY_BROKER_URL embeds the Redis password |
CONSOLE_API_URL, CONSOLE_WEB_URL, SERVICE_API_URL, APP_API_URL, APP_WEB_URL |
empty | Public URLs; set them for custom domains, HTTPS or split subdomains |
NGINX_HTTPS_ENABLED |
false |
Serve TLS with certificates placed in docker/nginx/ssl/ |
VECTOR_STORE |
weaviate |
Vector database; also selects the Compose profile that starts it |
UPLOAD_FILE_SIZE_LIMIT |
15 |
Maximum document size in MB |
SSRF_PROXY_ALLOW_PRIVATE_IPS |
empty | CIDR ranges that HTTP nodes and tools may reach inside private networks |
OPENAPI_ENABLED, ENABLE_OAUTH_BEARER |
false |
Both must be true before difyctl can sign in |
cd dify/docker
cp envs/vectorstores/qdrant.env.example envs/vectorstores/qdrant.env # optional template
docker compose down
docker compose up -d # apply changes
docker compose logs --tail 100 api worker
Call a published app
Each app has its own API key, which a person creates inside that app in the console. The base URL of a default self-hosted deployment is http://localhost/v1; Dify Cloud uses https://api.dify.ai/v1.
export DIFY_API_URL="http://localhost/v1"
# DIFY_API_KEY is an app key created by the user in the console
curl -s "$DIFY_API_URL/info" -H "Authorization: Bearer $DIFY_API_KEY"
curl -s "$DIFY_API_URL/parameters" -H "Authorization: Bearer $DIFY_API_KEY" | jq .user_input_form
# Chatbot and Chatflow apps (Agent apps use the same endpoint with "streaming")
curl -s -X POST "$DIFY_API_URL/chat-messages" \
-H "Authorization: Bearer $DIFY_API_KEY" -H "Content-Type: application/json" \
-d '{"inputs": {}, "query": "How do I reset my password?", "user": "customer-4821", "response_mode": "blocking"}'
# Workflow apps
curl -s -X POST "$DIFY_API_URL/workflows/run" \
-H "Authorization: Bearer $DIFY_API_KEY" -H "Content-Type: application/json" \
-d '{"inputs": {"ticket_text": "Card was charged twice for order 88213"}, "user": "support-bot", "response_mode": "blocking"}'
GET /parameters lists the input variable names an app expects. To continue a chat, send the conversation_id from the previous reply. response_mode is blocking (one JSON body) or streaming (Server-Sent Events); Agent apps only stream.
import json
import os
import requests
url = f"{os.environ['DIFY_API_URL']}/chat-messages"
headers = {"Authorization": f"Bearer {os.environ['DIFY_API_KEY']}"}
body = {"inputs": {}, "query": "Summarize this week's refund requests",
"user": "analyst-17", "response_mode": "streaming"}
with requests.post(url, headers=headers, json=body, stream=True, timeout=120) as r:
for
Установить dify в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dify?
Dify is an open-source platform for building LLM apps such as chatbots, agents, workflows and RAG knowledge bases, and it exposes every published app as a REST API. Use when a user asks to self-host Dify with Docker Compose, configure Dify environment variables, call a Dify app or workflow API, upload documents to a Dify knowledge base, export or import a Dify DSL file, run a Dify app from the terminal with difyctl, or upgrade and back up a Dify instance.
Как установить скилл dify?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dify запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic