Python · Independent guide

DeepSeek Harness Python SDK: Install and First Run

The official published Python SDK is deepseek-harness-sdk 0.1.5rc1, imported as deepseek_harness, and requires Python >=3.10. Its wheel depends on the matching runtime-bin distribution. The published wheel’s documentation launches the sdk profile with an explicit Harness home; newer GitHub sdk-minimal examples are a separate version context.

Reviewed Oct 4, 2026Developer previewIndependent guide
Evidence status: PyPI 0.1.5rc1 wheel metadata statically reviewed; newer dsh-v0.2.1-alpha.1 guide reviewed separately. No Python runtime execution or paid inference test. Re-check the linked first-party source after a new release candidate.
Track setup progress →

Sharing includes the public link only, without local progress or private configuration.

Start with this command

This is the narrow command relevant to this page. Read the checks below before changing flags, credentials or profile patches.

Public command · no secrets
python -m venv .venv
. .venv/bin/activate
python -m pip install deepseek-harness-sdk==0.1.5rc1

Install the official published SDK

Create a Python 3.10+ virtual environment and install deepseek-harness-sdk==0.1.5rc1. The SDK wheel depends on deepseek-harness-runtime-bin==0.1.5rc1; normal SDK execution does not require a system Node installation. A missing compatible runtime wheel is an installation problem, not an API authorization problem.

  1. Check the package name and Python version.
  2. Use python -m pip in the activated environment.
  3. Record the installed distribution version before copying newer examples.

Provide an explicit home and workspace

Construct DeepSeekHarness with dsh_home and cwd pointing to deliberate absolute directories, plus the provider and model supported by the installed runtime. The published wheel’s API requires an explicit Harness home through dsh_home or non-empty DSH_HOME; it deliberately does not discover ~/.dsh. Keep credentials in the local runtime environment or supported credential mechanism.

Run and inspect one small task

The published wrapper starts the bundled CLI lazily and reuses it until close or context-manager exit. It initializes the sdk profile by default. The wheel documentation describes a separate 30-second initialization timeout; ordinary turns remain unbounded unless a request timeout is set. Compare a small returned answer with the workspace contents, and treat startup, authentication and task completion as separate checks.

Match examples to the installed version

The current dsh-v0.2.1-alpha.1 repository guide describes sdk-minimal and a checked-in minimal.py example. That is newer than the PyPI 0.1.5rc1 publication, so do not assume the same shipped profiles or every example option exist in the published wheel. Consult the exact installed SDK metadata and matching release before adapting an example. This October review read the wheel metadata without executing its runtime or making a model request.

Customize a compatible SDK profile

The published SDK supports ordered patch files and a selected profile that retains a JSON-RPC server row. Persistent configuration belongs to that profile’s cordis.patch.yml. External bundle management needs pnpm; simply running the SDK does not. Preserve the home and use a fresh session ID for independent work; reuse an ID only to continue the same durable conversation.

First-party sources

Open the pinned or retrieved source before acting on a changed release candidate.

Continue by layer