Wactorz: Self-Writing LLM Agents That Discover, Repair, and Migrate at the Edge
Panagiotis Kasnesis, Lazaros Toumanidis, Amalia Contiero Syropoulou, Christos Chatzigeorgiou
Waldiez PC · ThinGenious PC
Published November 22, 2026 · on the feed November 24, 2026 · ▲ 4 · arXiv 2611.29619
The abstract
Most LLM agent frameworks build a crew that runs a task and exits. Physical environments (e.g., homes, labs, factory floors) need agents that stay up for months, survive their own bugs, and run on whatever hardware is already next to the sensors. We present Wactorz, an open-source runtime in which LLM-generated agents are long-lived, supervised actors: a planner turns a chat request into Python, compiles it into a new actor at runtime, and a supervisor restarts that actor alone, with its state intact, when it crashes. All coordination rides on MQTT, so agents can be spawned on, and live-migrated between, edge nodes such as a Raspberry Pi, and every internal event is a topic external systems can subscribe to. The recorded demo builds a camera-to-lamp automation from one chat request, adds a second agent that is auto-wired to the first by topic and carries a deliberate division-by-zero, watches that agent repair its own code without losing its count, then deploys a fresh Raspberry Pi node and live-migrates the agent onto it, in under four minutes of wall-clock time and \$0.13 of model usage. This extended version adds what the two-page demonstration paper could not: the Wiring view of the topic graph, Wactorz as a library for hand-written agents, how trained models are stored, sent to nodes and replaced, the security model, and the system's limitations.
The Brief
2:25A short podcast summary of the paper. Written and voiced by AI.
Transcript
Wactorz. Self-Writing LLM Agents That Discover, Repair, and Migrate at the Edge. By Panagiotis Kasnesis and three others, from Waldiez and ThinGenious. Published on the twenty-second of November.
Most frameworks for LLM agents assemble a crew, run a task, and exit. That pattern does not suit physical environments: homes, labs, factory floors. Agents there need to stay up for months. They need to survive their own bugs. And they need to run on whatever hardware already happens to sit next to the sensors, rather than on a machine chosen for them. A crew that finishes and disappears does none of those things.
Wactorz is an open-source runtime built around a different picture. The agents an LLM generates are treated as long-lived, supervised actors. Each one keeps running, and each one sits under a supervisor whose job is to bring it back when it fails. The agents are self-writing in a literal sense: a request in chat becomes the code of a new actor.
The flow goes like this. A planner turns a chat request into Python and compiles it into a new actor at runtime. If that actor crashes, a supervisor restarts that actor alone, with its state intact, so one failure does not take the others down or wipe what the agent had built up. All coordination rides on MQTT. Because of that, agents can be spawned on edge nodes such as a Raspberry Pi, and live-migrated between them. It also means every internal event is a topic that external systems can subscribe to, so the system's workings are visible from outside.
The evidence is a recorded demonstration. From one chat request it builds an automation linking a camera to a lamp. It then adds a second agent, which is wired to the first automatically by topic, and which carries a deliberate division-by-zero. The agent is shown repairing its own code without losing its count. Finally, a fresh Raspberry Pi node is deployed and the agent is live-migrated onto it. The whole sequence takes under four minutes of wall-clock time and zero point one three dollars of model usage.
This is an extended version of a two-page demonstration paper, and it adds what that short format could not hold. There is the Wiring view of the topic graph. There is Wactorz used as a library for hand-written agents. There is an account of how trained models are stored, sent to nodes, and replaced. And there are the security model and the system's limitations.
The design choice running through all of it is to treat an agent less like a job and more like a service. It is written once from a request, kept alive by supervision, repaired in place when it breaks, and moved to new hardware without being restarted from nothing, with every step published on a topic anyone can watch.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free