DeepSeekHarness Python Example: Run Your First Agent
The checked-in JSON-RPC example creates DeepSeekHarness with provider, model, workspace, session root and Cordis configuration, then calls run with a task and session id. Reusing an id continues durable session and shell state; a fresh id starts independently. This page separates verified behavior from community reports and marks the release-candidate context so you can act without mistaking an observation for a permanent guarantee.
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.
python examples/jsonrpc-agent/minimal.py \
--workspace /absolute/path/to/workspace \
--session-root /absolute/path/to/sessions \
--session-id example-001 \
"Inspect the repository and report its test command."What is verified now
The checked-in JSON-RPC example creates DeepSeekHarness with provider, model, workspace, session root and Cordis configuration, then calls run with a task and session id. Reusing an id continues durable session and shell state; a fresh id starts independently.
Evidence basis: Official checked-in example. The status was checked on 14 August 2026; re-check the linked source after any dsh release.
Safe workflow
Use the smallest reversible workflow first. Do not add community plugins or paste credentials while validating the base behavior.
- Create an isolated Python 3.10+ environment.
- Install deepseek-harness-sdk, not the similarly named third-party package.
- Use a disposable workspace and a fresh session id for the first run.
Verify before moving on
A successful result should be observable: a version string, reachable local URL, valid provider response, loaded configuration, or disappearance of the exact error. If the result differs, stop and capture sanitized evidence rather than stacking unrelated fixes.
- Record the exact dsh, Node or Python version.
- State the operating system and installation method.
- Link the first-party source and include only sanitized logs.
First-party sources
Open the pinned or retrieved source before acting on a changed release candidate.