langgenius/dify-plugin-sdks is a Python project with 150 stars. SDK for Dify plugins
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
The Python SDK for building Dify plugins: tools, model providers, agent strategies, HTTP extensions, datasources, and triggers.
Plugin development guide · Schema reference · Releases
Getting Started
Python 3.12 or later is required.
Install the SDK in your plugin's Python environment:
python -m pip install dify-plugin
The package name is dify-plugin; Python imports use dify_plugin.
For a new plugin, use the Dify Plugin CLI to generate the project, then follow the guide to configure, run, and package it.
Development
Install uv and just.
You can install just with uv tool install rust-just.
Run these commands from this repository:
just dev # Sync dependencies and install Git hooks
just fmt # Format code
just lint # Format code and apply lint fixes
just check # Check the lockfile, formatting, and linting
just test # Run SDK tests
just build # Build source and wheel distributions
just docs # Generate schema documentation
CI tests Python 3.12 and 3.13.
See CONTRIBUTING.md for setup details, integration test requirements, and contribution guidelines.
Production Plugin Examples
See langgenius/dify-official-plugins for production plugin implementations published and used by Dify.
OpenAI-Compatible Embeddings
Starting in SDK 0.11.0 (unreleased), OAICompatEmbeddingModel validates each response batch before sending the next request.
Each input must have one nonempty vector of finite numbers, with consistent dimensions across all batches.
Responses with index fields must cover every input in that batch exactly once using integer indices starting at zero; the SDK restores input order.
Responses without indices retain response order.
Malformed responses, including mixed index metadata, numeric strings, and booleans, raise an SDK invocation error.
This applies to plugins using the shared implementation, including GiteeAI and SiliconFlow.
LLM Polling Support
Since SDK 0.9.0, model plugins can declare the polling feature and implement _start_polling() and _check_polling() to handle long-running provider jobs through separate requests.
Both methods return LLMPollingResult with one of three states:
running: return plugin_state for the next check.
succeeded: return the final LLM result.
failed: return a terminal error.
OpenAI-Compatible Streaming
In SDK 0.11.0 (unreleased), OAICompatLargeLanguageModel preserves SSE data alongside comments and unknown fields.
Responses marked text/event-stream ignore events without data; invalid JSON in data fields still raises an invocation error.
The parser handles LF, CRLF, and CR line endings within events, including with custom delimiters.
A single leading UTF-8 BOM is ignored for both default and custom delimiters.
Raw JSON objects, single-prefix multiline JSON, and final payloads without a blank-line terminator remain supported.
Explicit response charsets are respected; responses without a charset default to UTF-8.
Version Management
SDK versions use MAJOR.MINOR.PATCH:
Major: incompatible API or architectural changes.
Minor: new features.
Patch: bug fixes.
Before SDK 1.0, minor releases may include breaking changes.
Review the release notes before upgrading.
For SDK Users
Constrain your SDK dependency to the minor version you have tested while allowing patch updates.
For example, dify-plugin~=0.10.2 allows patches in the 0.10 series.
Review and test a new minor release before updating the constraint.
HTTP Error Responses in SDK 0.11.0 (unreleased)
SDK-generated Serverless and Endpoint failures return HTTP 500 with the body Internal Server Error.
The original exception and traceback are logged on the plugin server.
Endpoint route failures return HTTP 404 with Not Found; exceptions from plugin construction or invocation, including ValueError, return HTTP 500.
Explicit HTTP responses returned by a plugin retain their status, headers, and body.
Update clients that parse exception text or treat a plugin's ValueError as a 404.
Protecting errors raised during Endpoint streaming also requires the daemon HTTP error fix on every daemon node.
With that fix, a stream that fails after headers are sent is interrupted, so clients must handle response-body read errors.
Upgrade the daemon first, then rebuild and deploy plugins with the updated SDK.
Agent Token Estimates
In SDK 0.11.0 (unreleased), agent token estimates include text blocks as well as string content and treat special-token spellings such as <|endoftext|> as ordinary text.
Message metadata and non-text payloads are excluded.
Counting previously ignored text can reduce the output budget in strategies that call recalc_llm_max_tokens, including Function Calling and ReAct.
The GPT-2 estimate remains approximate: budget adjustment retains a minimum of 16 output tokens and lets the provider decide whether the prompt fits.
Manifest Version Reference
The SDK dependency version and your plugin's top-level version in manifest.yaml are separate from these compatibility fields:
meta.version: the manifest schema version, used by Dify to determine supported plugin capabilities.
meta.minimum_dify_version: the earliest Dify version your plugin supports.
Set meta.minimum_dify_version for the features your plugin uses and test against that version.
Feature availability depends on the SDK, Dify, and the plugin daemon.
See the manifest schema for field definitions.
Meta.Version Reference
Manifest Version
Description
0.0.2
Adds the mcp tool provider type; use this schema version for plugins that accept MCP tools.
0.0.1
Initial manifest specification.
Meta.MinimumDifyVersion Reference
Minimum versions apply to the listed features.
Minimum Dify Version
SDK Version
Description
1.2.0
0.2.0
Fetch application information.
1.4.0
0.0.1-beta.49
LLM multimodal output.
1.4.0
0.3.1
OAuth authorization URL and credential retrieval.
1.5.1
0.4.0
dynamic-select parameters.
1.5.1
0.4.0
LLM structured output.
1.6.0
0.4.1
icon_dark field in the manifest.
1.7.0
0.4.2
Tool OAuth.
1.8.1
0.4.4
Filename in MultiModalPromptMessageContent.
1.9.0
0.5.0
Datasource plugins.
1.10.0
0.6.0
Trigger plugins.
1.11.0
0.7.0
Multimodal reranking and embeddings.
1.14.0
0.8.1
Dependency and project structure cleanup.
1.14.2
0.9.0
LLM polling invocations.
1.16.0
0.10.0
Read app_id through get_current_session() during app LLM invocations.
1.16.1
0.10.0
multiple: true for tool select and dynamic-select parameters; requires plugin daemon 0.5.0 or later.
Pending
0.11.0 (unreleased)
Tool parameter reset_on_change declarations; requires plugin daemon 0.6.11 or later and the pending Dify integration.
Pending
0.11.0 (unreleased)
Optional OnlineDriveFile.remote_metadata; requires plugin daemon 0.6.11 or later, with Dify browse and change-detection support still pending.
Literal Stop Sequences
Starting in SDK 0.11.0 (unreleased), LargeLanguageModel.enforce_stop_tokens stops at the earliest literal sequence, including punctuation and backslashes.
An empty stop list or no matching sequence returns the full input.
Callers that used regex patterns must supply literal stop strings: for example, replace r"\." with "." to stop at a period.
An empty string inside the stop list still matches at the start of the input.
How active is development on langgenius/dify-plugin-sdks?
The most recent commit recorded on langgenius/dify-plugin-sdks was 5 days ago, based on the GitHub push timestamp. The repository has 137 forks — one of the better signals of community interest.
How many stars does langgenius/dify-plugin-sdks have?
langgenius/dify-plugin-sdks has 150 GitHub stars — refresh the page for the live number, or check github.com/langgenius/dify-plugin-sdks. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is langgenius/dify-plugin-sdks open source?
Yes — langgenius/dify-plugin-sdks ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/langgenius/dify-plugin-sdks.
What is langgenius/dify-plugin-sdks?
langgenius/dify-plugin-sdks (langgenius/dify-plugin-sdks) is a Python project on GitHub. From the project's own README: SDK for Dify plugins
Where do I read more about langgenius/dify-plugin-sdks?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/langgenius/dify-plugin-sdks is the definitive source.
Read full README in the tab above.
Want a second opinion on dify-plugin-sdks?
Ask an AI that can read this page — one click and you get its take on dify-plugin-sdks.