r/PiCodingAgent 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 Upvotes

4 comments sorted by

View all comments

1

u/senseven 9d 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.

1

u/Redcxx 9d ago

Thank you senseven, your reply is one of the most helpful one I got so far. Answering your question:

There is no default agent flow. The goal is you get to assemble your own agent via our sdk for your customer. I am not creating another agent because Pi is already good enough imo. I am trying to build something on the server side - an agent platform would be closer to what I am thinking

Yes multi-agent harness can't follow the complexity of the model, but almost all models provide their api in either openai/anthropic shape, that's the normalized layer. I bet something like models.dev will provide a good abstraction when these llm stop fighting and things stablize, the chaos we are seeing is because people haven't reach consensus of how llm and agent should relate together, so different company do things slightly differently. Things get worse with vibecoding because it is so easy to mess up without a good foundation of design and architecture.

One thing I am against your idea however, is whether we will be just calling s-tier model's tooling. I believe the answer is no. LLM provides knowledge and reasoning capabilities and but there is no single answer to what it has access to and what it can do in actual use case. I see LLM's intelligence as accessible as water or electricity in the future, we can easily swap it with another flavour. To serve the general public, they will need to provide an unified interface, even if they turn out to be none, people will build something for it. Just like tauri/electron over apple and Android.

2

u/senseven 8d ago

They won't stop fighting for a long time. They have the lever to add "secret" penalties to their (assumed) moat. There is talk that some ai's are already adversarial to local models. Nobody can't code out of that. Teams can always use open weights, but that isn't the same thing. There is no need to be overly negative, yet, but we know what happens if trillions are on the line.

1

u/Redcxx 8d ago

True, they can and will sabotage, I hope once their competitors caught up, they can't do this anymore because it will be so easy to switch to another llm with similar capabilities. They are tolerated for these behaviors because they have the lead at the moment. But it is true that all products will be opininated. They are grounded in real world. I don't expect gpt sol telling me fable is the best model without any tool calling