DeepSeek, a whale that fits in a sandbox
DeepSeek Harness is DeepSeek's open-source agent. Link installs it (about 800 MB), keeps it in a sandbox and up to date, and turns off everything it would send DeepSeek.
lnk agent start --model deepseek/deepseek-v4-pro # paste your OpenRouter key when it asks
lnk agent use --harness deepseek # installs it, then starts it with your settings
lnk agent connect telegram # text it from your phoneUse a model
It uses the model your agent has, hosted with your key or running on your computer. DeepSeek's own models are on OpenRouter.
OPENROUTER_API_KEY=sk-or-... lnk agent start --model deepseek/deepseek-v4-proTalk to it
It speaks no connection itself, so Link carries Telegram, Slack, Discord
and Signal to it, as it does for Link Harness. Each chat is a dsh
session of its own that goes on where it was after a restart.
lnk agent connect telegramWhat Link does
Link installs it, gives it settings of its own, keeps it from sending anything to DeepSeek and runs it behind an endpoint of its own.
It installs it
Link installs Node from nodejs.org, checked against the SHA-256 in its
source, and then dsh from npm at the version it pins. Both go in
~/.deepseek in the harness's home.
It gives it settings
It gives dsh a settings layer of its own, ~/.deepseek/link.patch.yml,
that names your model, sets your files folder as the workspace and adds
its runtime configuration. The hub gives each session your tools and
memory as HTTP MCP servers. The model's key goes in dsh's
own store of keys, never on a command line.
Nothing reaches DeepSeek
Your model's requests go to your provider, and Link turns off the
session log, the plugin list, the telemetry and the web search that
dsh would send to DeepSeek.
It runs it behind an endpoint
It runs one dsh behind an endpoint on port 18820, and starts it again
if it stops. Stopped with a SIGTERM or SIGHUP, the endpoint stops dsh
with it and reaps its direct child during shutdown, including a
cancelled start.
Its scheduled jobs
Link's scheduler runs them: each reaches DeepSeek Harness as a message from the schedule, and its answer goes to the chat the schedule names.
One message at a time
A chat's messages run one at a time in its ACP session. The hub keeps that session by the chat's thread and takes it up again after a restart, so each answer stays with the conversation that requested it.
Ports
Its endpoint is on port 18820. With a local model's, that's the only localhost port the sandbox lets it connect to.
Files it keeps
What Link writes in the harness's home for it, beside dsh's own files.
.deepseek/link.patch.yml and link.env
Link's settings layer over dsh's, and its endpoint's key, both mode
600 in <harness home>, written at each start.
.deepseek/home/.credentials.yaml
dsh's store of keys, mode 600 in <harness home>, with the model's,
or its placeholder when the key is on the wire.
.deepseek/threads.json
Each chat's dsh session in <harness home>, so a chat goes on where
it was after a restart.
More about it
Troubleshooting says what to do when it fails,
Decisions why it works this way and
Security what it may do. Compare
Harnesses
sets it beside the other harnesses, and the other lnk agent commands
are on the
Agents
page.
Build and test
It depends on link-plugin from the core, beside it in the public
workspace.
cargo fmt --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --lockedRelease
Link's release builds lnk-deepseek from this folder and ships it as one
of Link's plugins, at the core's version, signed with Link's key.
License
MIT or Apache-2.0, at your option.
Docs
- Security: What
lnk-deepseekinstalls and runs, beyond what Link's sandbox guarantees every harness (Link's Agents Security page) - Decisions: Why
lnk-deepseekruns DeepSeek Harness the way it does - Troubleshooting: What to do when DeepSeek Harness doesn't install, start or answer (DeepSeek Harness)