Multi-Agent AI That Writes and Tests Your Code

2026-07-20 · 5 min read

multi-agent AI, AI coding, code generation, AI agents, Thalamus Build

Most AI coding tools work like a single very fast typist: you ask, one model answers, and you find out whether it works by running it yourself. Thalamus Build mode takes a different route. Instead of one model doing everything, it runs a small team of specialist agents that plan the work, write it, run it, and argue about whether it is actually correct before it reaches you.

Here is how that pipeline actually works — and why splitting the job across agents produces code you have to babysit less.

One request, a team of specialists

You start Build mode the same way you would start any chat: describe what you want in plain English. "Build a CLI that renames photos by the date in their EXIF data." "Add rate limiting to this Express route." "Write a parser for this weird log format."

Behind that request sits a pipeline of up to nine agents, each with one job:

Why a dispatcher, not all nine every time

Running nine agents on every request would be slow and wasteful. A one-line CSS fix does not need a Researcher or a security pass.

So the first thing that runs is a dispatcher: a lightweight model that reads your request and picks the minimum set of agents the job actually needs. A quick refactor might be just Coder and Critic. A new feature that touches authentication might pull in Analyser, Planner, Coder, Tester, Hacker, and Critic. The Coder and the Critic are always in the loop — something always has to write the code, and something always has to check it.

That minimum viable team design is the whole point. You get the depth of a full pipeline when the task is hard, and something close to a direct answer when it is easy.

Writing is only half the job

The reason single-shot AI code so often disappoints is that generating code and verifying code are different skills. A model that sounds confident can still hand you something that does not compile.

Build mode separates the two. After the Coder writes, the Tester can actually run the code in a sandbox rather than eyeballing it. The Critic then reviews the outcome, and if it is not satisfied it sends the work back for another attempt — a real retry loop, not a single guess. That back-and-forth is why the code you receive has usually already survived a round of criticism before you ever see it.

The right horsepower for each step

Under the hood, Thalamus runs frontier-grade models and gives every agent what its job actually needs — quick steps stay quick, and the heavy reasoning seats get room to think. You do not manage any of this. You describe the outcome; the pipeline decides how much horsepower each step deserves.

If a step needs current information from the web, the same live-search capability that powers Research mode feeds the Researcher agent, so plans are not built on stale assumptions.

Where the code runs

The pipeline does not stop at text. When the Tester needs to prove something works, Build mode can execute commands in a cloud sandbox and read back the real output. If you want to go further and try the result on a full machine, Thalamus also gives you a browser-based VM sandbox that boots a real operating system — no local install, no VM software of your own. Prefer to work off the web? There is a native Windows desktop app that drives the same pipeline.

What you actually see

From your side it stays simple. You watch the agents work through the request, see the files they create, and get code that has already been planned, written, and checked. Because each agent's job is narrow, the results are easier to follow than a single wall-of-text answer — you can see why something was built the way it was.

Try it on a real task

The fastest way to understand a multi-agent pipeline is to hand it something you would actually build. Open Build mode, describe a small tool or a fix you have been putting off, and watch the dispatcher assemble a team for it. It is free right now, so the only cost is the few minutes it takes to see the difference between one model guessing and a pipeline checking its own work.

More from the blog

Open Thalamus · All posts