
DeepSeek Harness is a highly anticipated open-source AI workspace application currently in the developer preview stage. It can not only assist in code and file analysis deep within the local workspace but also grants developers great flexibility through an open custom Provider mechanism. B.AI, as an advanced AI infrastructure, has built a full-stack large model service platform that integrates high availability and low latency, dedicated to creating a robust, stable, and highly resilient intelligent computing power network for developers and enterprises.
This guide will demonstrate in detail how to start DeepSeek Harness from scratch in Windows, macOS, and Linux environments, and successfully integrate it with the B.AI API. By following this tutorial, you will establish a complete end-to-end calling mechanism from the local workspace to the large model, fully unleashing the production and innovation potential driven by AI.
The final achieved call chain: DeepSeek Harness → B.AI API → Models provided by B.AI
1. Preparing the Environment
DeepSeek Harness starts with the built-in npx of Node.js. Please ensure that your system has the currently available LTS version of Node.js installed.
Official download link: https://nodejs.org/en/download
Windows
You can directly download the .msi installation package, or you can search for PowerShell in the start menu, open it, and run the WinGet installation command.
winget --versionwinget install --id OpenJS.NodeJS.LTS -e --source winget
macOS
Select the macOS Installer on the official Node.js download page, download the .pkg file, and complete the installation as prompted. After installation, press Command + Space to open Spotlight search, type Terminal, and enter the terminal.
Linux
Please select your Linux distribution and system architecture on the official Node.js download page and install the LTS version using the package manager commands provided on the page. Since installation commands differ among different distributions like Ubuntu, Debian, and Fedora, it is advisable to follow the commands dynamically generated on the official page to ensure the installation process is smooth and correct.
After the installation is complete, close all currently open terminal windows and reopen a new terminal (Windows users should use PowerShell, macOS users should use Terminal, and Linux users should use the system terminal).
In all three systems, run the following same set of check commands:
node -vnpm -vnpx -v
If all three commands return version numbers, it means the environment is ready.
Node.js v24.19.0npm 11.17.0npx 11.17.0
If you plan to build and run the project using the GitHub source code, you will need a Git environment. Please first run git --version in the terminal to check if it is installed. If it is not installed, please execute the following commands according to your operating system:
Windows
winget install --id Git.Git -e --source winget
macOS
xcode-select --install
Ubuntu or Debian
sudo apt updatesudo apt install git
Note: If you only plan to quickly experience and configure B.AI using npx, you can skip Git.
2. Starting DeepSeek Harness using npx (Recommended)
For developers who regularly use and configure the B.AI API, it is recommended to start directly with npx.
Run the following command in the terminal (universal for all three systems):
npx @deepseek-ai/dsh web
First-run prompt: The system will ask if you want to download the required packages; enter y and press enter to confirm.
Need to install the following packages@deepseek-ai/[email protected] to proceed? (y)
If you encounter dependency deprecation warnings during startup, this is normal and requires no intervention.
npm warn deprecated [email protected]
When the terminal outputs the local address, it indicates that the Web service of DeepSeek Harness has started successfully.
dsh web: http://127.0.0.1:3080
Keep the terminal window open, then type the following in the browser address bar:
http://127.0.0.1:3080
This address is accessible only from the local machine. If you close the terminal window or press Ctrl+C in the window, the local service will stop. If the browser fails to open 127.0.0.1:3080, please first check if the terminal is still running and confirm whether the above dsh web address has been output in the terminal. If necessary, please rerun the startup command.
npx @deepseek-ai/dsh web
3. Source Code Build Method (Advanced)
If you plan to develop plugins, modify the source code, or participate in project development, you can also obtain the source code from the official GitHub repository.
Official Repository: https://github.com/deepseek-ai/deepseek-harness
Please note that GitHub provides the project source code; after downloading, you must complete dependency installation and project building through the terminal. The project cannot be run by double-clicking the files directly. You can obtain and run the source code through the following two methods:
Method 1: Download ZIP Source Package Click the green Code button on the repository page and select Download ZIP. After downloading and unzipping, open the terminal, use the cd command to enter the unzipped project directory, and sequentially run the following commands:
npm install -g pnpmpnpm installpnpm run buildpnpm dsh web
Method 2: Use Git Clone It is recommended to run git --version first to check if the Git environment is present. If it is not installed, please refer to the earlier "Preparing the Environment" section to complete the corresponding system's Git installation. After confirming that the environment is correct, reopen the terminal and run the following commands:
git clone https://github.com/deepseek-ai/deepseek-harness.gitcd deepseek-harnessnpm install -g pnpmpnpm installpnpm run buildpnpm dsh web
Whether using ZIP or Git, after building and successfully starting, the access address will also be http://127.0.0.1:3080.
4. B.AI Custom Provider Configuration
Step 1: Skip the official default configuration
When you enter DeepSeek Harness for the first time, the system will pop up a window to fill in the API Key for the official model. Please make sure to click "Configure Later." If you fill in the B.AI Key here, the system will be unable to recognize it correctly.
Step 2: Enter the custom configuration page
Click the "Settings" in the lower left corner of the page, select "Models" from the left menu, and click "Add Custom Provider" on the right. Note: At this point, the official Provider showing a red dot is normal and does not affect subsequent operations.


Step 3: Fill in B.AI interface information
After opening the custom provider, fill in according to the information below.
Provider ID baiDisplay Name B.AIAPI Address https://api.b.ai/v1API Protocol openai-completionsAPI Key Valid API Key created from the B.AI backend
Step 4: Obtain model directory and complete Provider creation
After filling in the basic information, please scroll down to the "Model Directory" area. The system provides two addition methods: click "Add Model" to manually fill in the model ID, or click "Get Available Models" in the upper right corner.

Recommended Operation: First, click "Get Available Models." Let DeepSeek Harness directly request the current available model directory from B.AI associated with the account. If the model list returns normally, it proves that B.AI API Key, https://api.b.ai/v1, openai-completions protocol, and model directory interface configurations have been successfully connected.
Model selection and addition notes:
- In the returned list, check the currently available DeepSeek model from B.AI (examples include deepseek-v4-flash or deepseek-v4-pro; please note: specific available models will dynamically change according to account permissions and time, so please refer to the actual returned results).
- Please do not modify the model ID: The model ID must match exactly the directory returned by B.AI. Do not arbitrarily change any uppercase and lowercase letters, hyphens, or version numbers, or else errors such as model not found will likely be triggered during subsequent calls.
After confirming the model addition is correct, scroll to the bottom of the form and click "Create Provider."

After successful creation, the settings page will add a custom Provider named B.AI, and a green dot will be displayed next to it. This indicates that the B.AI custom Provider has been successfully saved and is available. Note: If the DeepSeek official Provider still shows a red dot at this point, it is due to not filling in the DeepSeek official API Key, which does not affect the normal use of the B.AI interface corresponding to the green dot.

Step 5: Link Connectivity Verification
Close the settings window and return to the main interface to create a new session. In the model selector, choose the B.AI Provider, then select the DeepSeek model you just added, and conduct the following tests:
Basic Dialogue Test: Select B.AI and the corresponding model in the model selector, and send the command:
Please introduce yourself and describe the model you are currently using.
Observe whether it can return content normally, whether there is streaming output, and confirm that the current Provider is B.AI and that the model ID is consistent with what you selected.
Tool Invocation Test: Send a read-only command to verify the tool link:
Please check the files in the current workspace and summarize the directory structure. Do not modify or delete any files.
The instruction particularly emphasizes "do not modify or delete any files" to safely and quickly verify that the Harness's tool invocation link is smooth without changing the current workspace.
During the execution of the above two tests, please check the terminal window running DeepSeek Harness to confirm that the console does not show 401, 404, model not found, or other request error messages. If the terminal runs smoothly, you have successfully completed all access and verification tasks.
Frequently Asked Questions Q&A
Q1: Terminal prompts do not find node, npm, or npx commands?
A: This usually indicates that Node.js has not been installed completely or that the path of the newly installed commands has not yet been read by the current terminal. Close all terminal windows, reopen them, and then run again.
node -vnpm -vnpx -v
If commands are still not found, return to the official Node.js download page and confirm that the current LTS version has been installed. Windows users can also check Node.js in the system's "Installed Applications," while macOS and Linux users can run which node to check the command path.
Q2: Appearing npm warn deprecated at startup, does it need to be addressed?
Please first confirm if the following address appears:
dsh web: http://127.0.0.1:3080
If that address is displayed normally, it indicates that the Web service has started successfully. Deprecated in this trial is a dependency deprecation warning and can continue to be used. If the terminal then exits abnormally or does not output the local address, please investigate based on the specific error information at the end of the terminal.
Q3: Browser cannot open 127.0.0.1:3080, what to do?
A: First, please check whether the terminal window running dsh web is still open. Closing that terminal or using the Ctrl+C shortcut will terminate the local service.
If the service has stopped, please rerun the startup command:
npx @deepseek-ai/dsh web
If the terminal prompts "Port occupied": please first terminate any lingering DeepSeek Harness processes and then try again.
Q4: Encountering 401 Unauthorized error when calling the model, how to troubleshoot?
A: The 401 error typically points to API Key authentication failure. Please check:
- Whether the API Key is completely copied, without extra spaces at the beginning or end.
- Confirm whether the API Key is in an active (not disabled) state in the B.AI console.
- Confirm that the Key is filled in the correct configuration item: do not fill it in the "DeepSeek Official Provider" that first pops up; it must be filled in the corresponding B.AI interface under "Settings → Models → Add Custom Provider."
Q5: Encountering 404 Not Found when calling the model, where is the mistake?
A: Please check whether the API Address is completely filled out.
https://api.b.ai/v1
Q6: Prompting model not found, how to solve?
A: Please return to the editing page of the B.AI custom Provider and click "Get Available Models" again. Ensure that the selected or filled model ID exactly matches the results returned by the system, preserving all uppercase and lowercase letters, hyphens, and version numbers strictly. Additionally, account permission updates or official model directory adjustments may also lead to old models becoming unavailable; in case of error, please always refer to the currently retrieved model list.
Q7: B.AI status shows a green dot, but still cannot converse?
A: The green dot only indicates that the configuration information has been saved. If you cannot converse, please confirm that the current session has correctly selected the B.AI Provider and the corresponding specific model, that the model ID is accurate, and that your B.AI account has the calling permissions and available quota for the corresponding model. Then, please combine the last terminal error code (e.g., 401/404) for targeted troubleshooting.
Q8: Will there be differences in the access page for Windows, macOS, and Linux systems?
A: There are slight differences in the preparation environment among the three systems. Once dsh web is started, all systems access http://127.0.0.1:3080 through the browser, and the steps for adding the B.AI Provider, obtaining models, and verifying dialogues are largely consistent.
Reference Links:
- Official Node.js download page: https://nodejs.org/en/download
- DeepSeek Harness official repository: https://github.com/deepseek-ai/deepseek-harness
- B.AI API documentation: https://docs.b.ai/llmservice/api/
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。