skillfed

dify-plugin

Dify Plugin SDK

dify-plugin v0.10.2 4.7M downloads/30d#2,259 on PyPI148
Permissive license Apache-2.0 Active released

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-plugin

uv

uv add dify-plugin

poetry

poetry add dify-plugin

Installing 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

dify plugin developmentllm plugin sdkdify extension frameworkbuild dify pluginsdify tool providerplugin sdk for difydify datasource plugin
llm-plugindify-ecosystemplugin-framework

More Application Frameworks packages