-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
en providers agent runners dify
If you haven't installed Dify yet, please refer to the Dify Installation Documentation to install it.
In the WebUI, click "Model Provider" -> "Add Provider", select "Agent Runner", select "Dify", and enter the Dify configuration page.
In Dify, one API Key uniquely corresponds to one Dify application. Therefore, you can create multiple Providers to adapt to multiple Dify applications.
According to the current Dify project, there are three types:
- chat
- agent
- workflow
Tip
Please ensure that the APP type you set in AstrBot matches the application type created in Dify.
Create your Dify Chat and Agent application keys as shown in the figure below:
Copy the key and paste it into the API Key field in the configuration, then click "Save".
Workflow applications receive input variables, execute the workflow, and output the results.
For Workflow applications, AstrBot will attach two variables with each request:
-
astrbot_text_query: Input variable name. This is the text content entered by the user. -
astrbot_session_id: Session ID
You can customize the input variable name in the configuration, which is the "Prompt Input Variable Name" shown in the figure above.
You need to modify the input variable name of your Workflow to adapt to AstrBot's input.
Finally, the Workflow will output a result. You can customize the variable name of this result, which is the "Dify Workflow Output Variable Name" in the configuration above, with a default value of astrbot_wf_output. You need to configure this variable name in the output node of the Dify Workflow, otherwise AstrBot cannot parse it correctly.
Create your Dify Workflow application's API Key as shown in the figure below:
Click the Publish button in the upper right corner -> Access API -> click API Key in the upper right corner -> Create Key, then copy the API Key.
Copy the key and paste it into the API Key field in the configuration, then click "Save".
Go to the Configuration page in the left sidebar, click "Agent Execution Method", select "Dify", then select the ID of the Dify Agent Runner you just created in the new configuration options that appear below, and click "Save" in the bottom right corner to complete the configuration.
You can use the /set command to dynamically set input variables, as shown in the figure below:
After setting variables, AstrBot will attach the variables you set in the next request to Dify, flexibly adapting to your Workflow.
Of course, you can use the /unset command to cancel the variables you set.
Variables are permanently valid in the current session.
- 首页
- 文档入口
- Top Level
- community events
- deploy
- dev
- others
- platform
- 接入 OneBot v11 协议实现
- 接入钉钉 DingTalk
- 接入 Discord
- 接入 Kook
- 接入飞书
- 接入 LINE
- 接入 Matrix
- 接入 Mattermost
- 接入 Misskey 平台
- 接入 QQ 官方机器人平台
- 通过 QQ官方机器人 接入 QQ (Webhook)
- 通过 QQ官方机器人 接入 QQ (Websockets)
- 接入 Satori 协议
- 接入 server-satori (基于 Koishi)
- 接入 Slack
- 接入消息平台
- 接入 Telegram
- 接入 VoceChat
- AstrBot 接入企业微信
- 接入企业微信智能机器人平台
- AstrBot 接入微信公众平台
- 接入个人微信
- providers
- use
- Home
- Docs Entry
- Top Level
- config
- deploy
- Deploy AstrBot on 1Panel
- Deploy AstrBot on BT Panel
- Deploy AstrBot on CasaOS
- Deploy AstrBot from Source Code
- Community-Provided Deployment Methods
- Deploy via Compshare
- Deploy AstrBot with Docker
- Deploy AstrBot with Kubernetes
- Deploy AstrBot with AstrBot Launcher
- Other Deployments
- Package Manager Deployment (uv)
- Installation via System Package Manager
- Preface
- dev
- ospp
- others
- platform
- Connect OneBot v11 Protocol Implementations
- Connect to DingTalk
- Connecting to Discord
- Connect to KOOK
- Connecting to Lark
- Connecting to LINE
- Connecting to Matrix
- Connecting to Mattermost
- Connecting to Misskey Platform
- Connect QQ Official Bot
- Connect QQ via QQ Official Bot (Webhook)
- Connect QQ via QQ Official Bot (Websockets)
- Connect to Satori Protocol
- Connect server-satori (Koishi)
- Connecting to Slack
- Messaging Platforms
- Connecting to Telegram
- Connect to VoceChat
- Connect AstrBot to WeCom
- Connect to WeCom AI Bot Platform
- Connect AstrBot to WeChat Official Account Platform
- Connect Personal WeChat
- providers
- 接入 302.AI
- Agent Runners
- Built-in Agent Runner
- Connect to Coze
- Connect to Alibaba Cloud Bailian Application
- Connect to DeerFlow
- Connect to Dify
- Connect AIHubMix
- coze
- dashscope
- dify
- 大语言模型提供商
- NewAPI
- 接入 PPIO 派欧云
- 接入 LM Studio 使用 DeepSeek-R1 等模型
- Integrating Ollama
- Connecting to SiliconFlow
- Connecting Model Services
- Connecting to TokenPony
- use
- Agent Runner
- Agent Sandbox Environment ⛵️
- astrbot sandbox
- Docker-based Code Interpreter
- Built-in Commands
- Computer Use
- Context Compression
- Custom Rules
- Function Calling
- AstrBot Knowledge Base
- MCP
- AstrBot Star
- Proactive Capabilities
- Anthropic Skills
- Agent Handoff and SubAgent
- Unified Webhook Mode
- Web Search
- WebUI







