Introduction

When building agents with DeepSeek Harness (DSH), handling identity verification or data entry scenarios often requires extracting structured information from images. Manually parsing ID card images is inefficient and error-prone. This plugin provides dedicated OCR capabilities for ID cards, allowing you to call backend services directly for recognition and validation.

Plugin Introduction

xby-ocr-id-card is a DSH model inference plugin maintained by xby-skill. It calls the Xiaobenyang OCR service to recognize the front and back information of an ID card, automatically determines whether the image is the front or back of the ID card, and validates the ID number.

Core Features

The plugin provides the following core capabilities:

  1. set_xby_apikey
    Used to set the API key. The configured key is automatically persisted and remains valid after restarting DSH.

  2. ocr_id_card
    Recognizes ID card information. Requires an image file URL.

  3. ocr_id_card_for_data_base64
    Recognizes ID card information. Requires a BASE64-encoded image string.

  4. ocr_id_card_for_data_file
    Recognizes ID card information. Requires a local image file path.

The recognition functions listed above all support extracting name, gender, ethnicity, date of birth, address, ID number, issuing authority, and validity period, and they automatically determine whether the image is the front or back of the ID card and validate the ID number.

Installation

Install the plugin using the DSH CLI:

dsh plugin --profile web add github:xby_skill/xby-ocr-id-card

Usage

Before use, go to the Xiaobenyang official website to register and obtain an API key.

  1. Call set_xby_apikey in a conversation or configuration to set the key.
  2. Select the appropriate recognition function based on the input data type:
    - If it is an image URL, use ocr_id_card.
    - If it is a BASE64-encoded value, use ocr_id_card_for_data_base64.
    - If it is a local file path, use ocr_id_card_for_data_file.

Notes

  • The plugin runs with the permissions of the current DSH process.
  • We recommend reviewing the source code and license (MIT) before installation.
  • Offline recognition is not supported; an internet connection is required to call the Xiaobenyang service.

Summary

This plugin provides DSH developers with a standardized ID card processing workflow, reducing the effort required to manually write parsing logic.

GitHub Repository