wireexec
Contents
wireexec is my personal project to put a few of a KVM’s abilities into a Raspberry Pi Zero small enough to hang off a laptop’s USB port, shaped for AI agents rather than people. I plug the Pi into my own Windows laptop, which is already signed in, and an agent I’m talking to elsewhere can run commands, move files and, when a task needs it, type and click there, with exactly my account’s permissions.
Three parts are involved, and only the middle one is new. I talk to an AI agent that runs remotely, in a chat or by voice; that conversation is simply how I work, not a feature of wireexec. The agent reaches the Pi over SSH, which in my setup only accepts connections through my authenticated Tailscale network, and drives a small command-line tool there called wx. The Pi runs that bridge and nothing else: no model and no agent runtime. The repository is private and the project is in development.
One session, start to finish
Using it
- I ask for something
- A command searches my notes
- The passage comes back to me
- A slow command, cancelled
- Close and clean up
- pi $wx close
- helper stopped · its folder checked and recycled
PS> $d="$env:TEMP\wireexec-native-…";mkdir $d;$c="$d\ca.pem";[IO.File]::WriteAllText($c,…);$s=curl.exe …WireExec: connecting over USB; temporary no-echo enrollment reader readyWX_NATIVE_RECYCLED=…\Temp\wireexec-native-…▍The animation compresses the waiting. My Pi is an older Pi Zero W 1.1: once it has power it needs roughly two and a half minutes before the bridge is ready, and only then can the agent start a session, which takes about 14 seconds. After that it feels quick; a small command answers in about 0.6 seconds.
Typing once, then staying quiet
To Windows, the Pi is a USB keyboard, a mouse and a small network adapter. Setup is the only time it has to type, and the agent names the laptop’s keyboard layout when it starts, so the characters come out right. Watching the laptop, you would see the Run box open, PowerShell start and one line of about 980 characters appear: a public certificate and a few commands that fetch the rest over the USB network. The helper program is checked against a pinned SHA-256 before it runs, then prints a single line saying it is waiting. The Pi types a one-time enrollment secret into that prompt without echo, so it never appears on screen or lands in a command line, file or clipboard.
From then on, commands, output and files use the network link, and the Pi counts every keyboard report it sends: ordinary commands add none. Typing and clicking stay available as separate, explicit actions for the moments an agent genuinely needs an app’s own interface. In one test, the agent opened a throwaway input window by command, typed into it through the Pi’s keyboard and read the text back. wireexec does not show the agent the screen; what it learns comes back as command output.
The USB link advertises no gateway and no DNS, so the laptop needs no internet connection for any of this; it only talks to the Pi. The Pi needs one way out, and I have used both my home Wi-Fi and my phone’s hotspot. Nothing is installed as a service on Windows and nothing listens there: the helper connects out to the Pi.
Slow commands, interruptions and missing replies
Every command has a deadline: 60 seconds unless the agent asks for longer. A command that runs out of time, or that the agent cancels, has its whole process tree stopped; in hardware tests a cancel took about 50 ms and the session simply carried on. A command that prints nothing for minutes is fine, because liveness comes from the connection rather than the output: the Pi and the helper check in every few seconds, and if they stop hearing each other for 30 seconds, the session ends and its work is stopped. Commands queue and run one at a time.
I track whether a command ran, whether its output arrived complete and whether its cleanup finished as separate facts. Sending the same request ID twice returns the first result instead of running it again, and asking about an ID returns whatever is actually known. If a reply goes missing after a command was sent, wx reports the outcome as unknown rather than guessing or retrying; that last rule has passed its software tests, and its run on the hardware is still to come.
Did it run? Did the result arrive?Leaving nothing behind, within limits
Each session lives in one temporary folder that holds two files: the certificate and the helper. When the session closes, or ends because the Pi went away, the helper stops the processes it started. The PowerShell script that launched it, which runs outside the helper, then checks that the folder still holds exactly those two files before moving it to the Recycle Bin. If anything else is inside, it stops and says so instead of deleting more.
That cleanup is deliberately narrow. Files the agent saves elsewhere stay where they are, a failed upload’s staging file is kept and reported rather than removed, and Windows’ own traces, like the Run box’s recent commands, are not touched. Uploads never overwrite an existing file.
What the hardware taught me
Working on the Pi Zero exposed problems that were easy to miss on a development machine. The first TLS connection spent roughly 19 seconds initializing entropy; moving that initialization ahead of readiness brought the measured warm handshake to about a tenth of a second without removing the entropy source.
A power interruption also exposed an incomplete deployment artifact. I changed the staging process around immutable, hash-named files and explicit verification before activation. These are small details until the device loses power halfway through an update.
Where it stands
Development and testing have been on my Windows 11 laptop with a signed-in user. Setup, commands, files, cancellation and cleanup as described here have passed on that hardware, and a reboot brings the Pi back into service on its own. Still open: reconnecting a dropped link within a session, explicitly replacing files, a packaged installer and pulling the cable mid-command. The most recent setup attempt, after an upgrade, also failed and is being diagnosed. macOS, Linux and older versions of Windows interest me, but there is no support for them and no plan yet.