On August 13, 2026, DeepSeek open-sourced its Agent runtime framework, DeepSeek Harness (commonly referred to as dsh). Compared to mainstream coding agents, dsh takes a lower-level, modular approach. It does not bind developers to any specific LLM; instead, it implements an "everything-is-a-plugin" philosophy, allowing developers to assemble and customize functional components to build tailored AI agents.
In practice, once an Agent is running, tasks such as editing code or modifying system configurations require robust underlying development tools. This article explores how to combine dsh with ServBay to build a complete local AI Agent development environment, incorporating web services, databases, a local AI Gateway, and LLM management.
1. Architecture and Positioning of DeepSeek Harness
In DeepSeek's architectural design, an Agent is defined as Model + Harness. The Model manages logical reasoning, while the Harness connects the model to the physical operating environment. dsh focuses on this Harness layer.
Built on top of the Cordis plugin kernel, dsh is written in TypeScript and open-sourced under the MIT license. Its architecture has three primary characteristics :
Everything is a Plugin: LLM integration, toolkits, session context, sandboxes, storage, main runtime loops, and UI components are fully modular plugins that can be swapped out.
Traceable Execution Paths: Prompts, intermediate chains of thought, tool-calling arguments, returned payloads, and sub-agent dispatches are written to an append-only session log, supporting session playback and branching state debugging.
Flexible Runtime Modes: Supports a Web UI mode for daily interactive use, a Headless CLI mode for CI/CD or scripting, and a Server mode that exposes APIs.
By August 21, 2026, just four days after launch, dsh reached version 0.1.1-rc.1, with the plugin ecosystem expanding to over 1,800 entries.
2. The Physical Environment Layer: Why Use ServBay?
While dsh handles the core framework logic of the Agent runtime, the Agent still requires infrastructure like databases, web servers, and SSL certificates to execute code editing and deployment tasks.
For example, if you instruct an Agent to "set up a WordPress blog," it must perform several actions:
Create a MySQL database and configure user permissions.
Start a matching PHP execution environment.
Configure Nginx virtual hosts and reverse proxies.
Generate SSL certificates and bind local development domains.
If an Agent attempts to install and configure these services individually on the host system via standard shell commands, the process is highly prone to failures due to dependency conflicts or differences in the host's system environment.
ServBay serves as an AI development management suite, hosting over 50 built-in development services (including MySQL, PostgreSQL, Redis, MongoDB, PHP, Node.js, and Go) while natively supporting both MCP Server and AI Gateway capabilities. This creates a natural synergy: dshmanages the Agent's reasoning logic and step orchestration, while ServBay provides isolated local environments to execute those steps safely.**
3. Step-by-Step Environment Configuration
Step 1: Set Up the Node.js Runtime in ServBay
dsh requires a Node.js environment of version 22.19 or higher. ServBay allows you to install and manage Node.js versions with a single click, bypassing manual downloads or nvm configurations:
Open the ServBay dashboard and go to Services.
Select the latest version of Node.js 22.x, then install and enable it.
Once installed, the
nodeandnpmcommands are immediately accessible in your terminal.
Note: Ensure your Node.js version is at least 22.19. In earlier releases, missing support for
createZstdDecompressandAbortSignal.timeoutcan causedshto crash during execution (documented in official discussions #100 and #311).
At the same time, ensure you have obtained a DeepSeek API key from platform.deepseek.com to add to the dsh configuration file.
Step 2: Install and Run dsh
With Node.js ready, execute the following command in your terminal to fetch and start dsh:
npx -y @deepseek-ai/dsh web
The initial dependency download takes approximately 1 to 3 minutes. Once started, the terminal will display:
dsh web: http://127.0.0.1:3080
Open this address in your browser to access the Web UI. To improve startup speeds for future sessions, we recommend installing the package globally:
npm install -g @deepseek-ai/dsh
dsh web
Within the dsh interface, you can select the inference tier next to the input box. For standard file operations or basic script execution, selecting the low tier (or disabling deep thinking) reduces the reasoning latency before tool calls. Switch to high or max tiers for complex logical refactoring.
Step 3: Configure the ServBay MCP Server
The Model Context Protocol (MCP) is an open interoperability standard. ServBay's built-in MCP Server exposes local service management APIs safely to AI agents.
Edit the global dsh configuration file at ~/.dsh/settings.yaml and add the ServBay connection declaration under the mcpServers block:
mcpServers:
servbay:
command: servbay-mcp-server
args: []
env: {}
Once configured, the Agent running in dsh gains authorization to manage the local environment:
Start, stop, and reload over 50 development services, including Nginx, MySQL, Redis, and MongoDB.
Create local development domains (e.g.,
*.servbay.host) and issue matching SSL certificates.Dynamically toggle runtime environments such as PHP (5.6 to 8.4) or Node.js versions.
Read and inspect service log outputs to debug environment failures.
4. Hands-on Practice: Deploying a Website and Database via Prompts
Once the MCP Server is connected, enter the following prompt in the dsh Web UI:
"Please help me set up a WordPress development environment with the following steps:
- Start MySQL 8.0 and PHP 8.3 services.
- Create a database named
wp_db.- Bind the domain
myblog.servbay.hostand generate an SSL certificate for HTTPS."
Upon receiving the task, the Agent decomposes the instructions using the dsh runtime logic and invokes ServBay's APIs sequentially via the MCP protocol:
graph TD
dsh[dsh Agent] -->|MCP Call| s1[Enable MySQL & PHP 8.3]
dsh -->|MCP Call| s2[Create wp_db Database]
dsh -->|MCP Call| s3[Bind myblog.servbay.host & Issue SSL]
s1 --> servbay[ServBay Dev Environment]
s2 --> servbay
s3 --> servbay
The Trajectory panel in the upper-right corner displays the specific API endpoints invoked by the Agent and the returned JSON payloads. The entire local site architecture is assembled automatically, without requiring the developer to type SQL queries or manually edit Nginx configurations.
Comparison: With MCP vs. Without MCP
| Action | Without ServBay MCP | With ServBay MCP |
|---|---|---|
| Start MySQL | Agent outputs setup guidelines; developer runs them manually. | Agent calls the API directly to start the service and verifies its state. |
| Create Database | Agent outputs the SQL statements; developer logs in and runs them. | Agent invokes the database creation tool and returns the database name and connection details. |
| Set Up HTTPS Site | Agent outputs Nginx configuration templates and certificate steps. | Agent maps the local domain, issues SSL, and configures proxy routing in a single call. |
The difference is notable: connecting to the MCP Server changes the Agent's role from a passive advisor providing configuration checklists to an active builder executing tasks.
5. Managing Model Credentials and Optimizing Costs via AI Gateway
Complex Agent workflows often require routing requests to multiple external LLMs. Storing raw API keys directly inside local project configurations risks accidental exposure if push commands upload those config files to public repositories. Additionally, iterative reasoning and tool-calling loops consume a significant volume of tokens.
ServBay's built-in AI Gateway serves as a unified routing hub and proxy for LLM APIs (accessible via https://gateway.servbay.host).
1. Centralized LLM Backend Management
Within the ServBay AI Gateway dashboard, you can configure cloud APIs from different providers and local models running on Ollama into unified upstream channels, managing routing and grouping policies centrally.
2. Update the dsh Provider Configuration
Redirect dsh's provider endpoint to your local Gateway address and use the virtual key generated by the gateway:
providers:
- name: servbay-gateway
baseUrl: https://ai.servbay.host/v1
apiKey: sb_vk_dev_project_alpha
models:
- deepseek-v4-flash
- deepseek-v4-pro
- qwen-2.5-coder-local
3. Benefits of Using the AI Gateway
Isolated Credential Security: Your master API keys remain encrypted inside ServBay's local storage. External applications only interface with virtual keys issued by the gateway. If a virtual key is compromised, you can revoke it instantly in the ServBay panel without impacting your master keys.
Seamless Model Fallback : You can configure failover rules in the Gateway dashboard. If the cloud-hosted DeepSeek API experiences rate limits or timeouts, requests automatically fallback to a locally running model in Ollama to prevent workflow interruptions.
Token Consumption Auditing: The Gateway logs token usage and costs for every single request, allowing you to monitor development overhead. Because
dshperforms reasoning loops before each tool call, monitoring costs helps prevent unexpected API invoices.Zero-Change Model Swapping: To switch from DeepSeek V4 Flash to V4 Pro, or route requests to a local Ollama model, you only need to adjust the routing rules in the Gateway panel. Your local
dshproject settings remain completely untouched.
6. FAQ
Why does dsh take so long to install?
Initial installation via npx pulls over 500 NPM packages, which can take up to 8 minutes on some Windows systems. We recommend installing the package globally via npm install -g @deepseek-ai/dsh to speed up future sessions. If you want to bypass manual Node.js setups, ServBay provides one-click installations for various Node.js versions.
Which models are supported by dsh?
dsh defaults to deepseek-v4-flash and deepseek-v4-pro. However, its modular architecture allows you to connect any model backend compatible with the OpenAI API format. Combining dsh with the ServBay AI Gateway lets you manage DeepSeek, OpenAI, Anthropic, Google, and Ollama backends under a single endpoint.
Does the ServBay MCP Server conflict with Claude Code's MCP configurations?
No. The Model Context Protocol is an open standard. The ServBay MCP Server can receive connections from multiple Agent tools (including dsh, Claude Code, Cursor, and Codex) simultaneously. Each tool maintains its own isolated configuration.
How secure are the AI Gateway Keys?
Master API keys are stored securely within ServBay's local encryption framework and are never uploaded to external servers. Virtual keys generated by the gateway can be revoked instantly from the local dashboard if exposed.
Is dsh ready for production environments?
dsh is currently in version 0.1.0-rc.6 and remains in a pre-release state. Its core APIs and plugin interfaces are actively iterating. The community-curated dsh-handbook documents several known issues and deployment lessons, which are worth evaluating before deploying it in production environments.
7. Conclusion
The open-sourcing of DeepSeek Harness provides developers with a clear, modular framework for building custom AI Agent runtimes. By pairing it with ServBay's extensive local service library, built-in MCP Server, and AI Gateway, you can quickly assemble a secure, observable, and highly efficient local development environment.
Related Resources
dshOfficial Repository: github.com/deepseek-ai/deepseek-harnessdshCommunity Handbook: github.com/Electricitysheep/dsh-handbookServBay Official Site: servbay.com
Note: This article is based on dsh version 0.1.0-rc.6 . Since the project is in a pre-release stage, its features and APIs are subject to change in future releases.






Top comments (0)