TLDR DeepSeek Harness (dsh) is DeepSeek AIโs open-source agent runtime, released in developer preview around August 13, 2026 under the MIT license. It follows the principle โModel + Harness = Agent,โ with every capability (models, tools, sessions, sandboxes, loops, UI) implemented as swappable Cordis plugins.
The fastest way to run it locally is npx @deepseek-ai/dsh web (requires Node.js ^22.19 or โฅ24), which starts a Web UI at http://127.0.0.1:3080. You supply a DeepSeek (or OpenAI-compatible) API key and a workspace. Source builds, desktop apps, Docker, Python SDK, and Ollama integrations are also available. For production-grade multi-model access, reliability, and cost control while using the harness, route requests through CometAPIโs unified OpenAI-compatible endpoint.
Key Takeaways
- DeepSeek Harness is not a modelโit is the local runtime/orchestrator that lets models act on files, shells, tools, and sessions.
- Official one-liner:
npx @deepseek-ai/dsh webโ opens local Web UI on port 3080. - Node.js requirement is strict: ^22.19.0 or โฅ24.x.
- Supports DeepSeek official models (deepseek-v4-flash, deepseek-v4-pro), custom OpenAI-compatible gateways, and local models via plugins/Ollama.
- Architecture is fully plugin-based (Cordis kernel); modes include Standard, Minimal, Code, and Creator.
- Rapid adoption: tens of thousands to well over 100k GitHub stars within days of launch.
- Recommended for power users: pair with CometAPI (https://www.cometapi.com/) as a custom provider for access to 500+ models, 20โ40% cost savings, and a single API key.
- Always use an isolated workspace; the agent can modify files and run commands.
- Developer preview status means breaking changes are expectedโpin versions for production-like experiments.
What Is DeepSeek Harness and Why It Matters in 2026
DeepSeek Harness (dsh) is an open-source agent runtime developed by DeepSeek AI. Released under the MIT license in developer preview, it emphasizes composability: every capabilityโmodel adapters, tools, skills, sessions, sandboxes, storage, agent loops, scheduling, and the UIโexists as a Cordis plugin that can be mounted, unmounted, swapped, or recomposed via configuration. There is effectively no privileged core that requires patching.
Key design principles include:
- Agent = Model + Harness.
- Traceable event streams supporting resume, fork, search, and replay.
- Multiple runtime modes (standard full toolset, code/orchestration mode, minimal mode for benchmarking, creator/experimental modes).
- Local-first Web UI for interactive use plus headless and SDK options for automation.
Official resources:
- GitHub: https://github.com/deepseek-ai/deepseek-harness
- Product/landing: https://www.deepseek.com/harness/en/ (and Chinese counterpart)
- Install guidance pages and community mirrors reinforce the same core commands.
Important terminology note: โlocal deploymentโ can mean two different things. The DeepSeek Harness discussed in this guide runs locally on your computer, but the standard
deepseek-harnessproject connects to DeepSeek V4-Pro or V4-Flash through an API. That means the harness, configuration, sessions, validation, and client logic can be local, while model inference is normally performed by DeepSeek's API. If you need genuinely offline inference with model weights on your own GPU, that is a different deployment architecture.
Prerequisites and System Requirements
Before installing, verify the following:
- Operating systems: Windows 10+, macOS 10.15+, mainstream Linux (x64 or arm64). Python SDK has additional constraints (Linux x64/arm64 or macOS 14+ arm64).
- Node.js: Required for the main Web UI path. Target range is ^22.19.0 || >=24.0.0. Check with node --version. Odd-numbered intermediate versions outside this range are not supported.
- Package managers: npm/npx (comes with Node). Source builds need pnpm (install via npm install -g pnpm).
- Git: Required for source cloning.
- Python (optional): 3.10+ for the official Python SDK.
- API key / endpoint: A DeepSeek API key from platform.deepseek.com, or any OpenAI-compatible endpoint + key + model name.
- Hardware: No GPU is required for the harness itselfโthe model inference happens remotely (or via a local provider you configure). Ordinary laptop resources are sufficient for the Web UI and orchestration.
- Network: Needed on first run to fetch packages; afterward the UI can operate with only model API calls.
- Workspace: Prepare an isolated directory. The agent can read, write, and execute commands inside the configured workspaceโnever point it at production or personal data without safeguards.
Sources for requirements: official README and multiple independent install guides published shortly after launch.
Method 1: Official One-Liner with npx (Recommended for Most Users)
This is the fastest and officially promoted path.
- Ensure Node.js meets the version requirement.
- Open a terminal and run:
Bash
npx @deepseek-ai/dsh web
- The package downloads (or uses cache), starts the Web UI profile, and prints the listening addressโby default http://127.0.0.1:3080.
- Open that URL in a browser. Accept the developer-preview notice if shown.
- On first use, configure a model provider (Settings โ Models) by pasting your API key and selecting a model such as deepseek-v4-flash or deepseek-v4-pro.
- Choose or create a workspace directory.
- Start issuing tasks.
To use a different port:
Bash
npx @deepseek-ai/dsh web --port 8080
Platform-specific one-liners that also ensure Node is present are available from community sites (PowerShell on Windows with winget, Homebrew on macOS, NodeSource on Debian/Ubuntu, etc.).
Pros: Zero permanent install footprint beyond npm cache; always pulls a recent published version; simplest onboarding. Cons: Relies on network for the initial package; less convenient for deep source inspection or custom builds.
Method 2: Install and Run from Source
Use this when you want to read Cordis plugins, pin a commit, develop custom presets, or contribute.
Bash
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
pnpm install
pnpm run build
pnpm dsh web
The same Web UI appears at the default port. Developer-preview builds can break between commits, so treat this as an experimental path.
Method 3: Desktop Applications (Zero Node Setup)
Community and third-party desktop wrappers package the runtime so users avoid installing Node/pnpm themselves:
- Tauri-based lightweight clients that bootstrap a bundled Node runtime and sync the latest upstream harness on launch. They run on 127.0.0.1:3080, keep data local, and register dsh commands.
- Electron-based packaging that includes pinned dependencies.
Download installers from the respective GitHub Releases pages (search โdeepseek-harness-desktopโ). First launch downloads the core components (a few hundred MB). These are convenient for non-developers but are not official DeepSeek productsโreview the repository and SHA checksums.
Method 4: Docker / Container Deployment
Community Docker images and compose files exist for running the Web UI inside a container, often with HTTPS termination via nginx and support for arbitrary OpenAI-compatible gateways. Typical flow:
Bash
git clone <docker-repo>
cd <docker-repo>
cp .env.example .env # set API key / public host
docker compose up -d --build
Useful for LAN access, servers, or environments where Node is not desired on the host. Some setups support custom settings.yaml for non-DeepSeek providers.
Method 5: Python SDK for Programmatic / Headless Use
For unattended agents or integration into Python pipelines:
Bash
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
python -m pip install deepseek-harness-sdk
Set environment variables:
Bash
export DEEPSEEK_API_KEY=sk-your-key-here
# optional: export DEEPSEEK_BASE_URL=http://127.0.0.1:8000/v1
# optional: export DSH_MODEL=deepseek-v4-flash
Then run the checked-in examples or use the DeepSeekHarness class in your own code against an isolated workspace and session directory. The SDK bundles its own runtime and does not require system Node.js.
Method 6: Ollama Integration
Ollama provides a convenience launcher:
Bash
ollama launch dsh
# or with a specific model
ollama launch dsh --model deepseek-v4-flash:cloud
Ollama can install the package if needed and stores launch settings separately. Web search and tool support depend on the chosen model and Ollama cloud access.
Configuring Models and Providers (Including CometAPI)
Inside the Web UI go to Settings โ Models.
- For official DeepSeek: paste the key from platform.deepseek.com. Typical models are deepseek-v4-flash and deepseek-v4-pro.
- For catalog providers (Anthropic, OpenAI, etc.): use the โAdd providerโ flow.
- For custom / self-hosted / aggregator endpoints: choose โAdd a custom provider.โ Supply a permanent Provider ID, base URL, protocol (usually openai-completions), API key environment reference or value, and at least one model ID.
CometAPI recommendation (strongly suggested for many production-like workflows) CometAPI is a unified AI infrastructure platform that exposes 500+ models (including DeepSeek variants, GPT, Claude, Gemini, Grok, and many others) through a single OpenAI-compatible endpoint: https://api.cometapi.com/v1.
Benefits when used with DeepSeek Harness:
- One API key instead of managing multiple provider credentials.
- Competitive pricing (reported 20โ40% savings versus direct vendor rates on many models).
- High availability (99.9% SLA target), low median latency, and pay-as-you-go billing.
- Easy model switching for A/B testing or cost optimization without changing harness configuration beyond the model ID.
- Drop-in compatibility: existing OpenAI SDK patterns work after changing only base_url and the key.
In the harness custom-provider form:
- Base URL:
https://api.cometapi.com/v1 - Protocol: openai-completions (or the equivalent supported option)
- API key: your CometAPI key
- Model ID: any supported model string from the CometAPI models catalog
This combination keeps the powerful local agent runtime while giving flexible, cost-effective, multi-vendor model access. New users typically receive free test credits. Documentation: https://apidoc.cometapi.com/.
Keys are stored write-only (e.g., under $DSH_HOME/.credentials.yaml); the UI shows only redacted descriptors.
Troubleshooting DeepSeek Harness
DEEPSEEK_API_KEY not found
Check:
echo $DEEPSEEK_API_KEY
On Windows:
echo $env:DEEPSEEK_API_KEY
If empty, configure it again.
400 reasoning_content error
This usually points toward incorrect handling of the reasoning lifecycle.
Check that your application preserves the relevant assistant reasoning information across multi-turn thinking/tool-call requests.
This is one of the core issues the harness is specifically designed to handle.
Context-length error
Check:
input tokens + max_tokens
The documented hard ceiling is:
1,048,576 tokens
Reduce either the input context or requested completion size.
Tool calls become malformed during streaming
Do not assume stream chunks arrive in tool order.
Aggregate tool-call deltas by tool_call.index, as recommended by the harness contract.
Requests are unexpectedly expensive
Check:
- thinking mode
- output length
- cache-hit rate
- prompt prefix stability
- model choice
- current API pricing
A simple improvement is often moving routine tasks from Pro to Flash.
Comparison of Installation and Deployment Methods
| Method | Ease of Use | Node Required | Best For | Persistence / Control | Typical Port / Access | Notes |
|---|---|---|---|---|---|---|
| npx one-liner | Highest | Yes | Quick trials, most users | Ephemeral (cache only) | 3080 (configurable) | Official recommended |
| Source (pnpm) | Medium | Yes | Development, plugins, pinning | Full source control | 3080 | Needs pnpm + build |
| Desktop (Tauri/Electron) | High | No (bundled) | Non-technical users | Local profiles & auto-update | 3080 (internal) | Community packages |
| Docker | Medium | No (container) | Servers, LAN, HTTPS | Container volumes | Custom / 443 | Community images |
| Python SDK | Medium | No (bundled) | Headless, automation, pipelines | Programmatic sessions | N/A (no UI by default) | Official SDK |
| Ollama launch | High | Optional | Local-model experiments | Ollama settings | 3080 | Integrates with Ollama |
Data synthesized from official docs and post-launch guides (August 2026).
Conclusion and Next Steps
DeepSeek Harness brings a cleanly designed, fully plugin-based agent runtime to local machines with almost zero friction via the npx one-liner. Combined with flexible model routingโespecially through a unified platform such as CometAPIโyou gain both the power of modern agentic coding workflows and practical control over cost, model choice, and data locality.
Start today with:
npx @deepseek-ai/dsh web
Configure a DeepSeek or CometAPI key, point it at a safe workspace, and explore the Standard mode. Then experiment with Minimal mode for benchmarks, custom providers for cost optimization, or the Python SDK for automation.
For the latest official instructions always prefer the GitHub repository and doc. For multi-model reliability and pricing advantages while running the harness, explore CometAPI and its documentation at https://apidoc.cometapi.com/.
