Personal project · Multi-agent systems

Agent Harness

A model-agnostic harness for building multi-agent systems and workflows

TypeScriptVercel AI SDKVS Code APIElectronReactSQLitenode-pty

Why I built it

I wanted one place to build multi-agent systems and workflows for my own tasks, where each agent can run on whichever model suits it.

The tools I used each led in something different. Codex is strongest on safety, Claude Code on long sessions and extensibility, Cursor on multi-agent work and its interface. Each is tied to its vendor's models or servers. I wanted the best parts of all three in one tool, driven by any model.

What it does

How it works

One headless engine runs everything and talks to its front ends over typed JSON-RPC. It has no Electron or VS Code imports, so the same engine sits behind all three.

Workflows are JavaScript scripts built from agent(), parallel(), pipeline() and phase() calls. They run in a sandboxed worker that can't read the clock or random numbers, so a re-run is deterministic and replays every step that already finished.

Underneath, each turn streams from the model through the Vercel AI SDK and starts tool calls as soon as they arrive, with reads in parallel and writes one at a time. A shadow git snapshot is taken around every edit, so any change can be undone, and shell commands run in a macOS Seatbelt sandbox ported from Codex. Switching models mid-session rewrites tool calls the new model can't use into plain text.

Why build a harness when Claude Code, Cursor and Codex already exist?

I use them, and the harness copies the best design from each, one capability at a time. None of them gave me all of it in one tool with any model behind it. I wanted a workflow where one agent runs on GPT, another on Claude and a cheap one on a local model, all sharing one sandbox, one undo history and the skills and agent files I already have.

Owning the engine also means I decide what is safe. Project settings and rules files are treated as untrusted, so a repo I clone can't redirect my API keys or loosen the sandbox.

Where it stands

Personal and private, never published. The main branch has the engine, subagents, workflows and all three front ends, with over 1,100 unit tests. Agent teams that build in parallel waves, best-of-N runs across models with a judge, MCP and plan mode are on a branch in progress.