dolphin-knowledge

Integrate Dolphin rule-engine SDKs for dynamic decision logic in Go and Rust services.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill dolphin-knowledge-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dolphin-knowledge
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/dolphin-knowledge
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill dolphin-knowledge-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires code.byted.org/dolphin/go-dolphin/v3, rust-dolphin, and includes references (resource) components.

What problem does it solve? Business logic that changes frequently forces constant code redeploys. This Skill teaches how to integrate the Dolphin dynamic decision platform SDK so rules execute locally in your Go or Rust service and update asynchronously without code changes. ## Core Features & Use Cases - Go SDK Integration (V3): Initialize DolphinClient with classic or Lite configs, execute BasicJudge requests, and parse structured decision responses. - Rust SDK Integration: Build and initialize rust-dolphin clients with async rule execution and sample logging. - Disaster Recovery: Load TOS-hosted backup rule files when Dolphin RPC is unavailable, with MD5 validation and decryption. - Lane (Swimlane) Testing: Deploy rule changes to isolated lane environments and promote them via full or gray release tickets. - Use Case: A backend service needs to adjust risk-control thresholds weekly. Instead of redeploying, rules are edited in Dolphin and the SDK picks them up automatically within the refresh interval. ## Quick Start Show me how to initialize the Dolphin Go SDK V3 client and execute a BasicJudge decision request for my event.

Frequently Asked Questions about dolphin-knowledge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate the Dolphin SDK into a Go service?

Install code.byted.org/dolphin/go-dolphin/v3, create a DolphinConfig with your bizline and event list, build a DolphinClient with options, then call Init before your service framework starts. Execute decisions with BasicJudge using bizline, event, timestamp, and JSON params.

How do I use the Dolphin Rust SDK for rule decisions?

Add rust-dolphin from the crates-byted registry, build a client with ClientBuilder using bizline and event names, then call init_async. Send BasicJudgeRequest with params JSON and await basic_judge to get the decision result.

What is the difference between Dolphin classic and Lite SDK modes?

Classic mode initializes with a bizline and explicit event list, while Lite mode uses NewLiteDolphinConfig with a bizline and optional strategy tags to load rules. Lite suits scenarios needing tag-based rule filtering.

Does the Dolphin SDK work when the Dolphin service is down?

Yes, via the disaster recovery mechanism. Rules are backed up to TOS, packaged into your build via curl in build.sh, and loaded with the backup_file_location parameter. The SDK falls back to backup rules when RPC returns no data.

How do I test Dolphin rule changes without affecting production?

Use lane environments: create a lane matching your company's multi-environment platform name, save rules to deploy them instantly in that lane, then submit a release ticket with full or gray rollout after validation.

Why does the Rust Dolphin SDK fail to compile with a missing native library error?

The error about missing rule_engine_aarch64_macos static library occurs on some local builds. Temporarily add a patch section in your root Cargo.toml pointing uren to the release branch of the risk_control/uren repository.