Get Started
lnk-openclaw lets a Link agent run on
OpenClaw, the personal AI assistant. It answers
Link's harness adapter commands: installing OpenClaw, configuring it,
and saying how to run it. It comes with Link: lnk agent use openclaw
adds it and installs OpenClaw the first time, in its own home,
~/Link/Agents/<agent>/Harnesses/openclaw. 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 openclaw # installs it the first time, then starts it
lnk agent new work --harness openclaw # or another agent, on OpenClawUse a hosted model
Anthropic, OpenAI or OpenRouter, with a key. With no --model, it uses
Link's default for the provider (Agents).
ANTHROPIC_API_KEY=sk-ant-... lnk agent startUse a local model
OpenClaw runs local models only through Ollama, registered with its
address and Ollama's own API, and a context window of 32,768 tokens on
both sides (OpenClaw's budget and Ollama's num_ctx): Ollama's default,
a few thousand, is smaller than OpenClaw's instructions. It needs the
models plugin. For a model in LM Studio, llama.cpp, vLLM or Jan, use
Hermes.
lnk up models
ollama serve
lnk agent start --model qwen3Clean up an old OpenClaw install
An OpenClaw installed before Link, or run outside its sandbox, leaves
files and its own service outside its home (listed in
Security). show finds them; remove
deletes them with its home, then start installs it fresh.
lnk agent openclaw show
lnk agent openclaw remove
lnk agent startHow it runs
lnk agent start installs OpenClaw's own release, the one Link pins,
with its own Node, in its home, and runs its gateway there, in the
sandbox. What it installs and which ports it uses: Security.
- You're its command owner on every channel you connect, so its
commands, such as
/restartand/updateon Telegram, work from your phone. - WhatsApp and Signal link from a QR code OpenClaw shows on your terminal. With WhatsApp on your own number, you talk to it in your chat with yourself.
- Its memory (its personality,
SOUL.md,AGENTS.md,memory/) stays in its workspace, in its home; your files are in the agent'sHome.
Limits
- Slack needs
lan. OpenClaw 2026.9.6's Slack plugin gives its socket (Socket Mode, undici 7) a proxy dispatcher from OpenClaw's own undici 8, which refuses it before it connects, whenever a proxy is set. Behind Link's proxy the socket never opens: the log showssocket-mode … WebSocket error! SMWebsocketErrorevery 15 seconds, and no message arrives. So with Slack or Discord connected, OpenClaw asks forlanbefore it starts (lnk-openclaw needs), which connects it without the proxy's filtering (the agent reaches this machine and its network too), and asks about its managed browser, whose ports are then on the machine's loopback (security).lnk agent openclaw deny lantakes it back. - No sandbox with OpenAI on a Mac. There OpenClaw runs Codex's
runtime, which runs
ps, a setuid program no sandbox on macOS runs: with OpenAI on a Mac, OpenClaw asks to run unsandboxed, and every start warns while it does. On Linux it runs sandboxed.
Troubleshooting
| Symptom | Fix |
|---|---|
| "OpenClaw runs local models through Ollama" | The model is in LM Studio, llama.cpp, vLLM or Jan: pull it in Ollama, or use Hermes. |
| No local model offered | lnk up models, then ollama serve. |
| It answers "Auto-compaction could not recover this turn" | The model's context window was too small: lnk agent start again sets 32,768 tokens. A model that can't hold that much needs more memory, or a hosted model. |
Slack: SMWebsocketError every 15 seconds, no messages arrive | OpenClaw's Slack socket can't use Link's proxy (Limits): lnk agent openclaw allow lan, or answer yes when it asks. |
| Something else on your Mac uses port 18789 or the ports after it | Stop it: main's ports are fixed. Another agent's are in its own block (lnk agent list --json). |
| An old OpenClaw install keeps starting outside Link | See Clean up an old OpenClaw install. |
Files it keeps
| File | What it is |
|---|---|
<harness home>/.openclaw/.lnk-tools.json | The MCP servers this adapter added to OpenClaw's settings, one per tool, so it removes only its own. |
<harness home>/.lnk-doctored | The release openclaw doctor --fix last ran for. |
Why it works this way: Decisions. What it may do: Security.
Work on its code
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
# OpenClaw 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 1Release
Link's release builds lnk-openclaw 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.
