dify-plugin
Dify Plugin SDK
What it is and what it does
Dify Plugin SDK is a framework for writing plugins that integrate with Dify, an open-source platform for building LLM applications. The SDK provides Python abstractions for declaring and implementing plugin capabilities—tools, LLM providers, datasources, and triggers—along with manifest specifications that tell Dify what your plugin offers. It handles request/response marshalling, authentication, and long-running job polling for LLM invocations.
The SDK is tightly coupled to Dify's versioning: each SDK release targets a specific minimum Dify version, and the manifest includes version fields so Dify can detect compatibility mismatches at install time. You write plugin code using the SDK's class-based interfaces, declare your plugin's capabilities in a manifest, and Dify loads and invokes your code through a well-defined protocol. The SDK is actively maintained and follows semantic versioning, so patch and minor updates are safe but major versions may break your plugin code.
Use it for:
- Build a custom LLM provider plugin to integrate a proprietary language model into Dify's agent workflows.
- Create a datasource plugin that connects Dify to an internal database or API for live data queries.
- Develop a tool plugin that wraps a third-party service so Dify agents can call it as an action.
- Implement a trigger plugin to let Dify workflows respond to external events.
- Build a reranking or embedding plugin to swap in custom models for semantic search in Dify retrieval pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python SDK for building plugins that extend Dify with tools, datasources, triggers, and LLM providers.
Yes, if you are building plugins for Dify. The SDK is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. The main constraint is Python 3.12 or later and ensuring your plugin's manifest version matches the Dify instance you are targeting.
Install
dify-plugin on PyPI
pip
pip install dify-pluginuv
uv add dify-pluginpoetry
poetry add dify-pluginInstalling dify-plugin
Before you install
Low friction installation with a pure Python wheel. Actively maintained with a release 4 days ago. Requires Python 3.12 or later.
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and license inclusion.
Quickstart
pip install dify-plugin==0.10.2
from dify_plugin import ToolProvider
class MyTool(ToolProvider):
def invoke(self, tool_name, tool_input):
return {"result": "output"}
Requires Python 3.12 or later
Verify before relying
- Whether the 13 runtime dependencies introduce any transitive security concerns beyond what OSV reports for dify-plugin itself
- Stability guarantees for the plugin API across minor version updates, given the semantic versioning policy described
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — flask, werkzeug, gevent, h11, httpx, pydantic-settings, pydantic, pyyaml, requests, socksio, tiktoken, yarl, packaging |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,670,847/month — #2,259 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dify_plugin-0.10.2-py3-none-any.whl
Keywords: dify, plugin, sdk
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
spaceforgeSpaceforge is a Python framework for building…
permissive · top 15,000 on PyPI
apache-airflow-providers-common-aiProvides AI/LLM hooks and operators for Apache…
permissive · top 15,000 on PyPI
livekit-plugins-groqIntegrates Groq's fast inference API with…
permissive · top 15,000 on PyPI
litellm-proxy-extrasProvides supplementary files for the LiteLLM…
permissive · top 5,000 on PyPI
livekit-plugins-anamAnam plugin for the LiveKit Agents framework…
permissive · top 15,000 on PyPI
livekit-plugins-telnyxIntegrates Telnyx telephony services with…
permissive · top 15,000 on PyPI
apm-cliAPM is a dependency manager and configuration…
permissive · top 15,000 on PyPI
alita-sdkAlita SDK provides a Python framework for…
permissive · top 15,000 on PyPI
aistudio-sdkPython client library for the AIStudio API,…
permissive · top 5,000 on PyPI