DSH TypeScript Tutorial
Build a minimal DeepSeek-style agent harness from scratch through a runnable TypeScript project.
Project overview
An offline-capable tutorial, available in Chinese and English, that explains the main runtime mechanisms of DeepSeek Harness through parallel TypeScript and Python implementations.
DeepSeek Harness, abbreviated as DSH, provides the runtime in which a language model performs tasks. It assembles model input, exposes tools, executes validated tool calls, records the run, and continues when one model response is not enough to finish the task. This repository reduces those mechanisms to two implementations that can be read, executed, and tested. It also includes an interactive tutorial site generated from the source code.
Each implementation uses six independent deterministic examples with only the inputs and runtime events needed for its questions. The chapters progressively add context projection, plugin lifecycles, a session log, dynamic plugins, and long-task continuation. Readers can inspect the source, model requests, and runtime state changed by each mechanism.