Introduction

When developing agents in DeepSeek Harness (DSH), if you need to integrate Bazi chart generation or Chinese almanac lookup functionality, you can directly use community-provided plugins. The xby-bazi plugin handles the related calculation logic, allowing developers to call its APIs in conversations or scripts to retrieve data.

Plugin Overview

This is a model inference plugin maintained by xby-skill. xby-bazi is an AI-based Bazi calculator designed to provide accurate Bazi chart data for personality analysis and fate prediction.

Installation and Activation

Install the plugin using DSH’s command-line tool:

dsh plugin --profile web add github:xby_skill/xby-bazi

After installation, the plugin becomes effective in the specified profile (such as web).

Core Functions

The plugin provides the following four core capabilities:

  1. set_xby_apikey
    Sets the API key in chat. This operation supports automatic persistence, so the key remains valid after a process restart.

  2. getBaziDetail
    Retrieves Bazi information based on gender and time.

    • Parameters: You must provide either solarDatetime (Gregorian time) or lunarDatetime (lunar time); the two are mutually exclusive, and only one can be passed. Gender must also be provided.
    • Returns: Bazi chart data.
  3. getSolarTimes
    Retrieves the list of corresponding Gregorian times based on a Bazi chart.

    • Return format: YYYY-MM-DD hh:mm:ss. Example: 1998-07-31 14:00:00.
  4. getChineseCalendar
    Retrieves Chinese almanac information for a specified Gregorian time. If no time parameter is provided, it defaults to retrieving today’s almanac information.

Prerequisites

Before calling the above functions, complete the following configuration:

  1. Register an account on the Xiaobenyang official website.
  2. Obtain an API key.
  3. Use the set_xby_apikey command to set the key in the current session.

Notes

  • When using getBaziDetail, pay attention to parameter validation and ensure that only one of solarDatetime or lunarDatetime is passed.
  • This plugin is licensed under the MIT License.

References