Lightagent: connect the agent to your own machines
Helix normally works on your local machine. But often the code and the compute live somewhere else: a rented GPU server, an internal dev box, a NAS or Raspberry Pi that stays on at home.
Lightagent is the remote data plane for those cases. It runs on the target machine and exposes only tool capabilities — shell execution, file reads and writes, LSP symbol analysis, code graph construction, on-demand Office runtime — and holds no LLM credentials and no chat history. Models, conversations, skills, and memory all stay in your local Helix.
┌──────────────────────────┐ ┌──────────────────────────┐
│ Local (control plane) │ HTTP │ Remote (data plane) │
│ Helix / aiagent │◄───────►│ lightagent │
│ · LLM credentials │ Bearer │ · Shell (remote exec) │
│ · Sessions & history │ auth │ · Serena (files + LSP) │
│ · Skills / memory │ │ · CRG (code graph) │
│ · Remote machine binding │ │ · Files / PTY / jobs │
└──────────────────────────┘ └──────────────────────────┘
Once bound, create a "remote workspace" for that machine: execute_shell, read-file, find_symbol, build_graph keep the same names and parameters as local, and the model cannot tell the difference.
Install
One line, installed into your user directory (no root):
curl -fsSL https://helix.iqe.me/downloads/lightagent/install.sh | sh
The script detects your platform, downloads the matching binary, verifies its sha256, and installs to ~/.local/bin/lightagent.
Register it as an autostart service (also no sudo — systemd --user on Linux, launchd on macOS):
curl -fsSL https://helix.iqe.me/downloads/lightagent/install.sh | sh -s -- --service
You can also grab a binary manually from the download page and chmod +x it.
Requirements: Linux (amd64 / arm64, statically linked, no glibc dependency) or macOS 11+ (Intel / Apple Silicon). Windows is not available yet.
Connecting: prefer an SSH port forward
Lightagent listens on 127.0.0.1:9121 by default. Keep it that way and borrow the port over SSH:
# On your own machine (not the remote host)
ssh -L 9121:127.0.0.1:9121 user@your-remote-host
Keep that terminal open, then choose Add Workspace → Remote Machine → Add machine in Helix and enter http://127.0.0.1:9121.
Two benefits: no firewall port has to be opened, so nothing is exposed to the internet, and because requests arrive over loopback, pairing needs no code — being able to SSH into the machine already proves you have access.
Direct connection (managed deployments only)
If you really do need to expose the port (manual access still goes through an SSH tunnel):
lightagent --host 0.0.0.0 --port 9121
Startup prints an 8-digit pairing code (also written to ~/.lightagent/pairing.txt) for non-loopback pairing requests. Note that the Helix binding dialog currently supports loopback binding only (it sends no code): use an SSH port forward for manual access; lightagent init --credential-stdin only fits managed deployments that pre-provision the same credential on both the control plane and the remote host.
--host 0.0.0.0 means anyone who can reach the port may attempt pairing. Use a security group, firewall, or ufw to restrict source IPs. The pairing endpoint is rate limited (10 attempts per minute) but has no IP allowlist.
Pairing rules
- Loopback skips the pairing code: requests from
127.0.0.1/::1are accepted directly. The check is allowlist-style — the presence of any common forwarding header (Forwarded, anyX-Forwarded-*,X-Real-Ip,CF-Connecting-IP, …) makes the request untrusted. - Non-loopback requires the code: 8 digits, generated with
crypto/rand, rate limited to 10 attempts per minute per TCP source IP. The rate-limit key deliberately ignores request headers, so rotatingX-Forwarded-Forcannot buy fresh quota. - ⚠ TCP-level proxies break the loopback assumption: nginx
stream, haproxymode tcp, frp, and cloudflared tunnels forward from127.0.0.1without adding any header. If you expose lightagent that way, add--require-pairingso every source (including loopback) must present the code. - After binding the endpoint returns 409: one machine serves one control plane at a time. To switch, run
lightagent reset-pairingon the remote host (the service re-reads state automatically, no restart needed). - No secrets land on the remote side: only the binary, language servers, and the data directory. When the rental ends, throw the machine away.
Self-check
Not sure whether everything is wired up? Run:
lightagent doctor
It checks item by item and prints the fix command when something is off:
lightagent doctor · 1.5.39 · darwin/arm64
data dir: /Users/you/.lightagent
ok platform darwin/arm64 · lightagent 1.5.39 (commit a1b2c3d, ...)
ok data-dir /Users/you/.lightagent
ok port 127.0.0.1:9121 available
warn binding not bound
→ pairing code: 12345678 (cat /Users/you/.lightagent/pairing.txt)
ok lsp:gopls /Users/you/go/bin/gopls (go)
warn lsp:pyright-langserver not found (affects: python)
→ npm i -g pyright (or pipx install pyright)
warn office-runtime not installed (only affects Office document tools)
→ POST /api/office-runtime/ensure after startup, or install from Helix
--json emits structured output for scripts or remote troubleshooting.
read-file works but find_symbol errors?Almost always a missing language server. Serena's symbol analysis needs the corresponding LSP installed on the target machine: gopls for Go, pyright-langserver for Python, typescript-language-server for TypeScript, rust-analyzer for Rust, clangd for C/C++. lightagent doctor lists what is missing and how to install it.
Commands
| Command | Purpose |
|---|---|
lightagent | Run in the foreground (default 127.0.0.1:9121) |
lightagent version | Version, commit, build time, platform |
lightagent doctor [--json] | Environment self-check |
lightagent service install | Register a per-user autostart service (no sudo) |
lightagent service status | Show service status |
lightagent service uninstall | Remove the autostart service |
lightagent upgrade [--check] | Check for and install a newer build |
lightagent reset-pairing | Unbind and generate a new pairing code |
lightagent init --credential-stdin | Bind with a pre-provisioned credential (automation path) |
lightagent upgrade downloads the new build, verifies its sha256, replaces the binary atomically, keeps the previous one as lightagent.old for rollback, and reminds you to restart the service.
Capability boundaries
Not everything should be remote. The split is:
| Capability | Where | Notes |
|---|---|---|
| Shell execution | Remote | Includes background jobs (wait_policy=background, job_wait) |
| File reads & writes | Remote | Includes upload, mkdir, rename, delete from the file panel |
| LSP symbol analysis | Remote | find_symbol, find_references, replace_symbol_body, etc. |
| Code graph (CRG) | Remote | Graph SQLite lives in ~/.lightagent/crg/ |
| Terminal (PTY) | Remote | Multiple sessions, resize, WebSocket streaming |
| Worktrees | Remote | Created and removed on the remote host |
| Office runtime | Remote | Downloaded on demand (~39MB; needs GitHub / PyPI access) |
| Document preview | Remote | Rendering happens where the file lives |
| LLM calls | Local | Sub-agent sessions and model policy stay local |
| Skills / memory | Local | They do not migrate with the machine |
| Browser automation | Local | Needs a real desktop environment |
Data directory
All state lives in ~/.lightagent/ (override with --data-dir or LIGHTAGENT_DATA_DIR):
~/.lightagent/
├── auth.json # node id, credential, binding state (0600)
├── pairing.txt # pairing code while unbound (0600, removed after binding)
├── crg/ # code graph SQLite
├── serena/ # LSP symbol cache
├── worktree/ # worktrees created remotely
├── runtimes/ # Office runtime (downloaded on demand)
└── background/ # background job logs
lightagent upgrade only replaces the binary and leaves the data directory untouched.
When not to use it
- One machine, code already on it: use a local workspace and skip the network hop.
- You only need GPU inference: that is model hosting, not a remote code machine.
- A Windows remote host: no build available yet.
- You need public connectivity and cannot open a port either: use an SSH port forward. If even SSH is unavailable (for example a container with only a web console), you have to solve reachability yourself — built-in tunnel support is not open yet.
Next
- Standalone client setup: install, bind, and create your first remote workspace
- Download page: artifacts and checksums for all four platforms
- Self-hosting: run the Helix backend itself on a server
- Workspaces: local vs. remote workspaces