在 DeepSeek Harness (DSH) 插件生态中,为智能体引入随机性是构建复杂流程的常见需求。传统的硬编码随机数无法满足分布式或可验证的场景。下面介绍 xby-drand 插件,它利用 Drand 协议提供可验证的随机数服务。
Introduction¶
xby-drand is a plugin maintained by xby-skill, mainly solving the problem of obtaining randomness in model-driven workflows for AI applications. It is based on the Drand protocol, supports retrieving random values by timestamp or round number, and requires an API key provided by the Xiaobenyang official website.
Core Features¶
The plugin provides the following capabilities:
- set_xby_apikey: Set the API key in the chat session. It supports automatic persistence and remains valid after restart.
- get_randomness_latest: Get the latest random value from Drand quicknet.
- get_randomness_by_round: Get the random value corresponding to the specified round.
- get_randomness_by_time: Get the random value corresponding to the specified timestamp.
Installation and Enablement¶
Use the DSH CLI to install the plugin:
dsh plugin --profile web add github:xby_skill/xby-drand
Usage Instructions¶
In a DSH conversation, call the above functions:
- Set the key: Trigger
set_xby_apikeyin the conversation and enter the API key obtained from the Xiaobenyang official website. - Get the latest randomness: Call the
get_randomness_latestinterface. - Get by time: Call the
get_randomness_by_timeinterface. - Get by round: Call the
get_randomness_by_roundinterface.
Notes¶
This plugin is suitable for developers who need to introduce deterministic or distributed randomness into AI workflows.
* You need to register on Xiaobenyang official website and obtain an API key.
* The plugin code is hosted on GitHub. It is recommended to review the source code and the MIT license before use.
The above is an introduction to the xby-drand plugin. For more details, please refer to the plugin catalog or the source repository.