This guide applies todeepseek-harness-sdk==0.1.0rc6anddeepseek-harness-runtime-bin==0.1.0rc6. Repeat the read-only fixture test below after upgrading the client.
Configuration
The model catalog changes over time. Query it with your dedicated Coding Plan key before setup:
deepseek-v4-pro is present. Do not substitute deepseek-v4-flash for the tool-mode example: its multi-turn reasoning history and tool replay did not pass this pinned-version verification.
1. Get a dedicated Coding key
Open your Coding Plan application, then create or copy the API key attached to that Coding Application. Coding Plan does not consume the general balance, so a key from another application does not prove plan access. Export the key only in the current shell:2. Create a disposable workspace
The bundled Harness runtime includes a local Bash tool. Do not point the first test at a real repository or your home directory. Create a disposable directory with no secrets:deepseek-harness-runtime-bin version is available. Do not broaden filesystem access with danger-full-access; this example passes only the disposable directory as cwd.
3. Run the official Python SDK
Save this as/tmp/deepseek-harness-demo/run.py:
/v1/chat/completions, SSE, reasoning, tool calls, and tool-result replay. Delete /tmp/deepseek-harness-demo when finished. Treat retained session files as sensitively as source code because they may contain workspace context.
Troubleshooting
- 401: export
ACEDATACLOUD_API_KEYin the same shell that launches Python. - 403 or quota error: confirm that the key belongs to the active Coding Application and that Credits remain.
- Model not listed: query
/v1/modelsagain instead of relying on an old screenshot. reasoning_contentor tool replay error: use the pinned SDK/runtime versions anddeepseek-v4-pro.- Unexpected repeated tools: stop tasks with side effects and rerun this read-only fixture first.
- Installation error: confirm Python 3.10+, supported OS/architecture, and matching SDK/runtime versions.
Scope
This guide verifies the local Python SDK with text and tool loops over Chat Completions. Images, Files API,/v1/responses, /v1/messages, remote workspaces, and a hosted sandbox are outside this guide. Workspace permissions and local command risks remain the responsibility of the machine running Harness.

