Dify Plugin Daemon is a service that manages the lifecycle of plugins. It's responsible for 3 types of runtimes:
Dify api server will communicate with the daemon to get all the status of plugins like which plugin was installed to which workspace, and receive requests from Dify api server to invoke a plugin like a serverless function.
All requests from Dify api based on HTTP protocol, but depends on the runtime type, the daemon will forward the request to the corresponding runtime in different ways.
For more detailed introduction about Dify plugin, please refer to our docs https://docs.dify.ai/plugins/introduction.
A CLI tool is provided for plugin development on local environment.
brew
Both Linux and MacOS on either arm64 or amd64 architecture are supported.
brew tap langgenius/dify
brew install dify
Download the binary file from the assets' list in the release page.
Firstly copy the .env.example
file to .env
and set the correct environment variables like DB_HOST
etc.
cp .env.example .env
Attention that the PYTHON_INTERPRETER_PATH
is the path to the python interpreter, please specify the correct path according to your python installation and make sure the python version is 3.11 or higher, as dify-plugin-sdk requires.
We recommend you to use vscode
to debug the daemon, and a launch.json
file is provided in the .vscode
directory.
Daemon uses uv
to manage the dependencies of plugins, before you start the daemon, you need to install uv by yourself.
There is a possibility that you have multiple python versions installed on your machine, a variable PYTHON_INTERPRETER_PATH
is provided to specify the python interpreter path for you.
Currently, the daemon only supports Linux and MacOS, lots of adaptions are needed for Windows, feel free to contribute if you need it.
NOTE: Since the daemon depends on a shared
cwd
directory for running plugins, it's not recommended to use network-based volumes or bind mounts from outside the host machine. This could result in poor performance, such as plugins not launching in a timely manner.
uses docker volume to share the directory with the host machine, it's better for performance.
For now, Daemon community edition dose not support smoothly scale out with the number of replicas, If you are interested in this feature, please contact us. we have a more production-ready version for enterprise users.
Refer to Benchmark
Dify Plugin Daemon is released under the Apache-2.0 license.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。