Install
openclaw skills install dify-flow-accessQuery and interact with company knowledge bases or workflows using Dify API with multi-turn context and streaming response support.
openclaw skills install dify-flow-accessUse OpenClaw to query company knowledge base or execute workflows via Dify API. Supports multi-turn conversation and streaming responses.
When users need to access internal knowledge bases, documentation queries, Q&A systems, or execute specific workflows, this skill handles those requests such as "help me check the knowledge base" or "query Dify workflow".
# Basic ChatApp mode query (recommended, no workflow ID needed)
/dify-workflow "如何部署项目?" --chat
# Workflow mode query (requires specifying workflow ID)
/dify-workflow "查询 AI 助手信息" --wf wf_123456abcdef
# Multi-turn conversation (use conversation_id from previous response)
/dify-workflow "那退款流程呢?" --conv conv_xyz789
# Streaming response (show results incrementally)
/dify-workflow "解释一下这个概念" --stream
# Combined usage
/dify-workflow "查询中电港 AI 助手相关信息" --chat
Base URL: http://10.10.10.159/v1
API Key: app-jUhDcPj3lcnEG04JW4gRsfyy
You can override defaults via environment variables:
export DIFY_BASE_URL="http://your-dify-server/v1"
export DIFY_API_KEY="your-api-key-here"
export DEFAULT_TIMEOUT=120
| Option | Description | Example |
|---|---|---|
--chat | Use ChatApp mode (default for most apps) | --chat |
--wf ID | Specify workflow ID for Workflow mode | --wf wf_xxx |
--conv ID | Specify conversation ID for multi-turn | --conv conv_xxx |
--stream | Enable streaming response mode | --stream |
POST /v1/workflows/run - Execute predefined workflowsPOST /v1/chat-messages - Chat interface with knowledge base{
"inputs": {},
"query": "user query",
"conversation_id": "conv_xxx", // Optional for multi-turn
"response_mode": "blocking", // or "streaming"
"user": "openclaw-user",
"files": []
}
{
"workflow_id": "wf_xxx",
"inputs": {
"query": "user query"
},
"response_mode": "blocking",
"user": "openclaw-user"
}
The script automatically extracts answers from different Dify response formats:
.data.answer.data.outputs.answer or .data.outputs.*.answer (top-level)/dify-workflow "员工手册中的报销政策是什么?" --chat
# First query returns conversation_id: conv_abc123
/dify-workflow "那加班制度呢?" --conv conv_abc123
/dify-workflow "生成月度报告" --wf wf_report_gen_xyz
/dify-workflow "分析这个数据集" --stream
"not_workflow_app"
--chat flag: /dify-workflow "query" --chat"conversation_id_invalid"
--conv option"workflow_not_found"
wf_)"query missing parameter"
ChatApp Mode:
Workflow Mode:
wf_\u4f60\u597d → 你好)For issues or questions:
http://10.10.10.159/v1Note: Default timeout is 120 seconds to accommodate complex workflow executions. Adjust via DEFAULT_TIMEOUT environment variable if needed.