Get Started

lnk-deepseek lets a Link agent run on DeepSeek Harness (dsh), DeepSeek's open-source agent. It answers Link's harness adapter commands: installing it, configuring it, and serving it to Link's channels. It comes with Link: lnk agent use deepseek adds it and installs it the first time, about 800 MB, in its own home, ~/Link/Agents/<agent>/Harnesses/deepseek. Every other command is on Link's Agents page. How it compares with Link's other harnesses: Harnesses.

Quickstart

lnk up agents
lnk agent use deepseek        # installs it, then starts it with your settings
lnk agent status

Use a model

It takes the model your agent has: Anthropic, OpenAI or OpenRouter with a key, or any local runtime lnk model list finds. DeepSeek's own models are on OpenRouter:

OPENROUTER_API_KEY=sk-or-... lnk agent start --model deepseek/deepseek-v4-pro

Talk to it

It speaks no channel itself: Link carries Telegram, Slack, Discord, WhatsApp and Signal to it, as it does for Link Harness. Each chat is a dsh session of its own, which goes on where it was after a restart.

lnk agent connect telegram
  • Install: Node from nodejs.org, checked against the SHA-256 in Link's source, then dsh from npm at the version Link pins (lnk-deepseek's VERSION), both in ~/.deepseek.
  • Configure: a settings layer of Link's, ~/.deepseek/link.patch.yml, passed to dsh with --patch. It names your model as a provider of its own, at Link's proxy when the key is on the wire. It sets your files folder as the workspace, and adds your tools and memory as MCP servers. It turns dsh's own sandbox and approvals off, since Link's sandbox confines it. The model's key goes in dsh's own store of keys, never on a command line.
  • What it sends DeepSeek: nothing. Your model's requests go to your provider. Link turns off what dsh would send DeepSeek: the session log it attaches to requests to DeepSeek's API, its list of plugins, its telemetry, and its web search, which goes through DeepSeek's API.
  • Run: lnk-deepseek serve, which answers chat completions on port 18820 and runs one dsh --profile acp behind it, started again if it stops. A thread's turns run one at a time; a turn dsh says nothing of for 30 minutes is cancelled, so the next can run. dsh starts on its own, whoever asked for it, and has 2 minutes to answer ACP's initialize; starting or taking up a thread's session has 2 minutes too, then the message fails and the next one tries again.
  • Health: GET 127.0.0.1:18820/health, which answers once dsh does, waiting up to 3 s for one starting.
  • Proof: GET 127.0.0.1:18820/_link/proof, where it proves to Link's channels that it holds the endpoint's key before they send it.

Ports

Its endpoint, 18820: with a local model's, the only localhost port the sandbox lets it connect to.

Troubleshooting

SymptomFix
"the Node Link downloaded isn't the one it pins"A bad download. Nothing ran; try again later.
"dsh said nothing for 30 minutes, so the turn was cancelled"dsh hung on a turn; lnk agent logs -f has its errors. The thread's next message runs.
status says it isn't answeringlnk agent logs -f: dsh's own errors are there.
"dsh didn't answer initialize within 120 s"dsh hangs at its start; lnk agent logs -f has its errors. The next check or message starts it again.
Something else uses port 18820Stop it: main's port is fixed. Another agent's is in its own block (lnk agent list --json).
It answers without web searchExpected: its search goes through DeepSeek's API, which Link turns off. Its web_fetch works.

Files it keeps

FileWhat it is
<harness home>/.deepseek/link.patch.yml, link.env (600)Link's settings layer over dsh's, and its endpoint's key; written at each start.
<harness home>/.deepseek/home/.credentials.yaml (600)dsh's store of keys, with the model's.
<harness home>/.deepseek/threads.jsonEach chat's dsh session, so a chat goes on where it was after a restart.

Why it works this way: Decisions. What it may do: Security.

Build and test

It depends on link-plugin from link-core, checked out beside this folder.

cargo fmt --check
cargo clippy --all-targets --locked -- -D warnings
cargo test --locked
# DeepSeek Harness itself, installed and run by link-core's lnk-harness in its
# sandbox, on the wire (Linux, bubblewrap; a few hundred MB)
# and the conformance kit (link-core's), run against it
LNK_TEST_REAL=1 cargo test --locked --test on_the_wire -- --test-threads 1

Release

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.