integrations-extras/dify in the Python SDK repository is a tool provider with six tools:
The customer (id type and id), the conversation id and the channel are set by the app builder, usually from the app’s variables (
sys.user_id, sys.conversation_id), and never by the model.
Install
- Build the package from the repository (
pip install dify_plugin niadraanddify plugin package ./difyproduce the.difypkg), install it in your Dify and add the provider with a Niadra source key (from the Console). The API address field stays empty; it only serves the local emulator. - In a chatflow: a Get context node before the LLM node (customer message =
sys.query, conversation id =sys.conversation_id), its text in the LLM’s system prompt after your instructions, and a Record reply node after the LLM. - In an agent: add the history tools; their descriptions are the same the model gets from every Niadra SDK.
The five primitives
Limits
- The six take the same connection fields: the customer’s id type and id, the conversation id and the channel, mapped from the app’s variables.
- When Niadra is slow or down, the context comes out empty and a tool says the history is unavailable; the app never stops.
- The plugin stores nothing;
PRIVACY.mdin the package lists what it sends to Niadra (the customer’s handle, the conversation id, the messages of each turn and the model’s queries). - Tested with Dify’s plugin SDK (
dify-plugin0.10.2) and Niadra on the emulator, inintegrations-extras/dify/test_niadra_plugin.py.
Next steps
Langflow
the three Langflow components.
Python SDK
the library the plugin uses.

