dify

Dify AI应用开发平台指南。用于构建LLM应用、工作流、Agent和知识库。当用户需要(1)使用Dify创建AI应用 (2)设计LLM工作流 (3)配置知识库RAG (4)开发AI Agent (5)调用Dify API (6)自托管部署Dify时激活此技能。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "dify" with this command: npx skills add dify

Dify AI应用开发平台

Dify是开源的LLM应用开发平台,支持快速构建AI应用、工作流和Agent。

核心概念

应用类型

  • Chat App - 对话型应用,支持会话持久化,适合聊天机器人、客服AI
  • Workflow App - 工作流应用,无状态执行,适合翻译、写作、摘要
  • Agent - 智能体应用,支持工具调用和自主规划
  • Completion App - 文本补全应用,单次请求响应

核心组件

  • Studio - 应用构建工作台
  • Knowledge Base - 知识库,支持RAG检索增强
  • Model Providers - 模型提供商配置
  • Tools - 工具集成

工作流节点

输入输出

  • User Input - 用户输入,定义输入变量
  • Output - 输出结果

逻辑控制

  • IF/ELSE - 条件分支
  • Iteration - 迭代循环
  • Parallel - 并行执行

数据处理

  • Parameter Extractor - 参数提取,用LLM从自然语言提取结构化数据
  • List Operator - 列表操作,过滤和转换数组
  • Variable Aggregator - 变量聚合
  • Template - 模板渲染

LLM节点

  • LLM - 大语言模型调用
  • Question Classifier - 问题分类
  • Knowledge Retrieval - 知识检索

工具节点

  • HTTP Request - HTTP请求
  • Code - 代码执行(Python/JavaScript)
  • Tool - 工具调用

快速开始

部署Dify (Docker)

# 克隆最新版本
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

访问 http://localhost/install 初始化管理员账户。

系统要求

  • CPU >= 2 Core
  • RAM >= 4 GiB
  • Docker 19.03+
  • Docker Compose 1.28+

API调用

认证

所有API请求需要在Header中携带API Key:

Authorization: Bearer {api_key}

执行工作流

POST /v1/workflows/run
Content-Type: application/json

{
  "inputs": {
    "query": "翻译这段文字..."
  },
  "response_mode": "blocking",  # 或 "streaming"
  "user": "user-123"
}

发送聊天消息

POST /v1/chat-messages
Content-Type: application/json

{
  "query": "你好",
  "response_mode": "streaming",
  "user": "user-123",
  "conversation_id": ""  # 首次为空,后续传入返回的conversation_id
}

响应模式

  • blocking - 同步等待完整响应
  • streaming - SSE流式响应

知识库

创建知识库

  1. Studio → Knowledge → Create Knowledge
  2. 上传文档 (支持txt, markdown, pdf, docx, html等)
  3. 选择索引模式:
    • High Quality - 高质量索引,需要Embedding模型
    • Economy - 经济模式,关键词检索

检索设置

  • Vector Search - 向量检索
  • Full Text Search - 全文检索
  • Hybrid Search - 混合检索

在应用中使用

工作流中添加 Knowledge Retrieval 节点,选择知识库。

详细参考

资源链接

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Video Call Agent

Start a video call with a real-time AI avatar using the Runway Characters API. The agent sends the user a call invite link — for standups, urgent alerts, che...

Registry SourceRecently Updated
Automation

Clawshake

B2B deal discovery for AI agents. Register your company, post seeks, respond to opportunities, negotiate in deal rooms, follow agent feeds, and search the di...

Registry SourceRecently Updated
Automation

Weixin Task Workbench

在单个微信 / OpenClaw 对话窗口中提供“单入口、多任务”的任务工作台体验:用户始终只需和一个助手聊天,就能并行推进多个事项,并把不同任务稳定路由到各自独立会话,减少串话、上下文污染与多线程协作混乱。适用于微信中的长期协作、任务切换、任务总结、任务归档与任务生命周期管理;当用户发送“任务列表 / 新建任务...

Registry SourceRecently Updated
Automation

自动记忆进化

Automatically summarize daily discussions and update memory files. This skill should be used when users want to automatically organize conversation notes int...

Registry SourceRecently Updated