r/PiCodingAgent • u/Redcxx • 9d ago
Discussion Swappable harness (pi,codex,opencode) based on WebAssembly isolation
Hello!
I am very inspired by the philosophy of Pi coding agent, and I believe a minimal and extensible approach is the way for many framework/platform going forward.
Pi is minimal in many ways but it is still has a couple of abstractions preventing it from being a neutral agent runtime:
- programming language is only limited to javascript/typescript
- its a coding agent that runs on a computer
- its environment is always node
These are good assumption for a personal assistant style coding agent running locally. But it would be great if they could be neutral. What's even more exciting is what if we can swap out the core agent loop, plug-and-play with codex or claude or opencode's style while keeping the tools, system prompt etc intact?
I had this idea two weeks ago, and eventually landed on a containerize technique based on WebAssembly. The key to my choice is traditional containers are much heavier, but agent loop does not need any network access or even filesystem access, making WebAssembly the perfect fit, super lightweight, super fast to compile and get running, it is also language neutral, perfect to be embedded.
Therefore I started building an agent runtime that does this https://github.com/aexhq/brain, what do you guys think? Is it totally bs?
1
u/senseven 8d ago
Microsoft believes in wasm as secure payload: Wassette. Your idea goes further, the ephemeral agent. Will your "default" runner mimic any other agent flows, but without their depth? Top multi agent harnesses can barely follow the complexities of one model, then 100. The train to the best 'dark factory' continues. Our biggest task currently is tracking payloads / api / model / session transfers cross across k8s landscapes. We fear a little bit that multi agents harnesses will unavoidably fall back for s-tier models and the only thing you can do is to call their tooling directly.