- name
SKILL.md
स्किल फ़ाइल पब्लिशर की रिपॉज़िटरी में ही रहती है।
कॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add agentsope/SkillAlchemy --skill agentsop-dify -a cursor -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add agentsope/SkillAlchemy --skill agentsop-dify -a claude-code -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add agentsope/SkillAlchemy --skill agentsop-dify -a codex -yकॉपी की गई कमांड टर्मिनल में पेस्ट करें। यह इस SKILL.md को उस एजेंट में इंस्टॉल करती है।
npx skills add agentsope/SkillAlchemy --skill agentsop-dify -a grok -yकॉपी किया गया संदेश Grok Bot चैट में भेजें। Bot यह SKILL.md GitHub से लाता है और उसे उन स्किल में जोड़ देता है जो आपके सभी Bot साझा करते हैं।
Install this skill: https://github.com/agentsope/SkillAlchemy/tree/HEAD/skills/agentsop-difyपब्लिशर से
框架定位: "An open-source platform for building agentic workflows" — visual workflow + RAG + agent + monitoring + deploy in one box, self-hostable. [docs.dify.ai/en/introduction], [github.com/langgenius/dify]
"Dify is the only tool that gives you data ingestion, RAG, an API, and a polished, shareable web UI in one click." [learnwithparam.com/blog/batteries-included-rag-platforms-dify-ragflow-onyx]
Dify 的核心价值是 "把 LLM 应用工程的脚手架打平"——auth、API、UI、向量库、模型 provider、日志、版本——而不是替代 LLM 编排框架本身的表达力。
判断公式:
[Studio] ← Visual canvas (workflow / chatflow / agent / chatbot / text-gen)
↓ 编排
[Apps] ← 5 种 app 类型,全部跑在统一 Graph Engine 上
↓ 依赖
[Knowledge] ← RAG pipeline (ingest → chunk → embed → index → retrieve → rerank)
↓ + 调用
[Tools/Plugins] ← Marketplace: Models / Tools / Agent Strategies / Extensions / Bundles
↓ 观察
[Monitoring] ← 内建 logs + 外接 LangSmith / Langfuse / Arize Phoenix / Opik
参考: [docs.dify.ai/en/introduction], [dify.ai/blog/dify-plugin-system-design-and-implementation]
核心决策树:
有对话上下文需求?
├─ 是 ─→ Chatflow (复杂逻辑) 或 Chatbot/Agent (简单)
└─ 否 ─→ Workflow (复杂逻辑) 或 Text Generator (单 prompt)
需要 LLM 自主选择工具 / 多步推理?
├─ 是 ─→ Agent app 或 Workflow + Agent Node (推荐, 1.9+)
└─ 否 ─→ Workflow / Chatflow + 显式节点编排
参考: [docs.dify.ai/en/use-dify/getting-started/key-concepts], [hellodify.com/en/docs/workflow/workflow-chatflow-difference], [zediot.com/blog/dify-difference-between-agent-and-workflow]
"Workflow behaves more like a script… each Workflow run is a completely fresh start. Chatflow… is a robot that can interact with users in a loop." [hellodify.com/en/docs/workflow/workflow-chatflow-difference]
"Dify's canvas includes LLM calls, knowledge retrieval, conditionals, HTTP requests, code nodes (Python/Node), Jinja transforms, iterators/loops, and aggregators." [legacy-docs.dify.ai/guides/workflow/node]
v1.0+ 引入插件系统,从 monolith → marketplace。 [dify.ai/blog/introducing-dify-plugins]
决策: 一次性 = HTTP Request 节点;可复用 = Tool plugin;逻辑深 = Agent Strategy plugin。
RAG 流程: Ingest → Extract → Clean → Chunk → Embed → Index → Retrieve → Rerank → Augment [docs.dify.ai/en/guides/knowledge-base/readme]
三种构建方式:
向量库支持: 13+ (Qdrant 默认推荐, Weaviate, Milvus, Pinecone, PGVector, TiDB, Chroma…) [deepwiki.com/langgenius/dify-docs/8.3-vector-database-configuration]
检索策略:
官方建议: "Workflow/Chatflow are recommended for most use cases. Use the legacy basic types (Chatbot/Agent/Text Generator) only if preferring simplified interfaces over advanced features." [docs.dify.ai/en/use-dify/getting-started/key-concepts]
Cloud (推荐起步):
Self-host (Docker Compose) — 最常用:
git clone https://github.com/langgenius/dify
cd dify/docker
cp .env.example .env
docker compose up -d
关键环境变量:
VECTOR_STORE — 选 Qdrant / Weaviate / Milvus / Pinecone…PLUGIN_DAEMON_TIMEOUT=300 — 插件超时WORKFLOW_MAX_EXECUTION_TIME / HTTP_REQUEST_MAX_READ_TIMEOUT — 长链路必调{{var}} 抽出来——后续会成为 workflow 输入"Dify provides a comprehensive RAG pipeline handling the full lifecycle from raw file upload through extraction, cleaning, segmentation, embedding, indexing, retrieval, and reranking." [pyshine.com/2026/04/20/Dify-Open-Source-LLM-App-Development-Platform]
构建顺序 (反直觉但重要):
反模式: 一上来就画 30+ 节点的复杂图。先线性跑通,再分支。
# 一个典型 Dify workflow 的 building blocks
inputs: # Start 节点变量 (text / number / file / select)
nodes:
- llm: # 调模型
model: gpt-4-turbo
prompt: "..."
memory: false # workflow 永远是 false
- knowledge_retrieval: # 查知识库
datasets: [kb_id_1, kb_id_2]
mode: hybrid
rerank: bge-rerank
- if_else: # 分支
conditions: [...]
- iteration: # 批处理列表
iterator: {{node.output}}
sub_workflow: [...]
- code: # Python/Node
code: "def main(x): return ..."
- http_request: # 调外部
method: POST
url: "..."
- agent: # 自主决策子节点 (1.9+)
strategy: react / function_calling / custom
tools: [...]
max_iterations: 5
outputs: # End / Answer 节点
{{node_id.var}} 跨节点引用sys.user_id, sys.conversation_id 等症状:
决策树:
节点数 < 20 且分支扁平
→ 留在 Dify, 优化命名 + 加 Note
节点数 20-40, 有可复用子流程
→ 拆 sub-workflow (打包成 Tool 给主流程调用)
节点数 > 40 或 大量 Code 节点
→ 信号: 业务逻辑已超出可视化优势
→ 把核心逻辑改写为 Python 服务, Dify 只做编排前端 + RAG
实操:
反模式: 在 Code 节点里写 200 行 Python——这是 "Dify 已不合适" 的信号。
症状:
判断公式:
混合方案 (推荐): Dify 做前端 / RAG / 用户管理 / 监控;核心 agent 逻辑跑在 LangGraph 服务后端,Dify HTTP Request 节点调用。
"Dify wins when you're building an LLM-powered SaaS, an internal product with multiple teams… Langflow is for teams that need power now and will need more later." [blog.elest.io/dify-vs-langflow-vs-flowise]
症状:
决策矩阵 [architjn.com/blog/dify-cloud-pricing-plans-free-tier-when-to-self-host]:
实操要点:
症状:
决策:
混合: Dify Knowledge 管常规文档;External Knowledge API 接你的自有 RAG 服务做长尾。
症状: 同一个需求,三种实现方式纠结。
决策原则 [zediot.com/blog/dify-difference-between-agent-and-workflow], [dify.ai/blog/dify-agent-node-introduction-when-workflows-learn-autonomous-reasoning]:
任务路径可预测、调试性优先
→ 显式 Workflow (写死分支)
任务路径不可预测、需 LLM 选工具
→ Workflow + Agent Node (1.9+)
[推荐!! 比纯 Agent app 更可控, 既享受自主性又有 workflow 外壳]
纯对话 + 工具调用、不需要复杂编排
→ Agent app (legacy)
混合: 主流程显式, 局部不确定路径
→ Workflow 主图 + 不确定段塞 Agent Node
"The best systems combine both — workflows as orchestrators that delegate reasoning tasks to agents. This hybrid model provides both predictability and intelligence." [zediot.com/blog/dify-difference-between-agent-and-workflow]
反模式:
PLUGIN_DAEMON_TIMEOUT参考: [blog.elest.io/dify-vs-langflow-vs-flowise], [jimmysong.io/blog/open-source-ai-agent-workflow-comparison], [toolhalla.ai/blog/dify-vs-flowise-vs-langflow-2026]
此时: Dify 退到 "前端 + 监控 + RAG 仓库",核心逻辑切到 LangGraph / 自研代码服务。
# 一个 "知识库问答 + 工具调用" 的最小 chatflow 骨架
app:
name: support-copilot
mode: advanced-chat # = chatflow
graph:
nodes:
- start: { variables: [{name: query, type: text}] }
- knowledge_retrieval:
dataset_ids: [kb_docs]
retrieval_mode: hybrid
top_k: 5
rerank_model: bge-reranker-v2
- llm:
model: gpt-4-turbo
prompt:
- role: system
content: "You are a support agent. Use the context to answer."
- role: user
content: "Context: {{knowledge_retrieval.result}}\n\nQ: {{start.query}}"
memory: { enabled: true, window: 10 } # chatflow 才有
- answer: { stream: true, content: "{{llm.text}}" }
features:
- annotation_reply: true
- moderation: openai-moderation
- conversation_variables: [user_tier]
SOP for building LLM applications on Dify — visual workflow + chatflow + agent + RAG knowledge base + plugin marketplace + observability, self-hostable. Use when shipping LLM apps fast with a "no-code
---name: agentsop-difydescription: SOP for building LLM applications on Dify — visual workflow + chatflow + agent + RAG knowledge base + plugin…---# skills/agentsop-dify/SKILL.mdओवरव्यू
SOP for building LLM applications on Dify — visual workflow + chatflow + agent + RAG knowledge base + plugin marketplace + observability, self-hostable. Use when shipping LLM apps fast with a "no-code to pro-code" gradient, especially when non-engineers need to co-author the flow.
FAQ
पब्लिशर से skills/agentsop-dify/SKILL.md डाउनलोड करें, या पाथ कॉपी करके रिपॉज़िटरी खोलें। PlugMCP स्किल को सूचीबद्ध करता है, फ़ाइल होस्ट नहीं करता।
पब्लिशर इसे https://github.com/agentsope/SkillAlchemy पर रखता है।
Claude, Cursor, Codex और Grok Build वह SKILL.md पढ़ सकते हैं जिसे आप पब्लिशर की रिपॉज़िटरी से जोड़ते हैं। जब आप चैट में स्किल के GitHub फ़ोल्डर का लिंक भेजते हैं, तो Grok Bot उसे इंस्टॉल कर देता है।