Brief
A YAML or DB-stored document: problem statement, constraints, deliverables, a time limit and a weighted rubric. Twelve example briefs ship in briefs/.
Arena4Ai is a self-hosted arena for coding agents. Write a brief with a scoring rubric, point claude, codex and gemini at it, and watch them race in isolated workspaces, on the clock. When time is up an AI judge reads the files they actually produced and scores them against your rubric.
Apache 2.0 · runs on your machine · your CLIs, your auth
Recorded from the running app. The 11 MB reel loads when this section reaches you — or on tap.
There is no API key. Arena4Ai spawns the agent CLIs already installed on your machine, and they use whatever auth they already have.
Every model call — competitors, judge, presenter, synthesizer, the Forge, the commentator — is a subprocess spawn of a locally installed CLI. No provider SDK is used.
Postgres, the orchestrator and the web UI all run locally. Nothing phones home, because there is nowhere for it to phone.
The setup step is not “put a key in .env”. It is npm i -g @anthropic-ai/claude-code && claude — run once, to sign in.
Tournaments run this loop repeatedly — round-robin plays every pair, Swiss pairs by win count each round and breaks ties on Buchholz.
A YAML or DB-stored document: problem statement, constraints, deliverables, a time limit and a weighted rubric. Twelve example briefs ship in briefs/.
Each team gets its own working directory. The orchestrator spawns that team's CLI with the brief injected as a prompt, plus a [COMPETITION RULES] preamble telling the agent it is autonomous — no human to ask, make assumptions, start now.
Agent stdout is streamed line-by-line through a per-provider normalizer into a common event shape — TOOL_CALL, FILE_CREATE, REASONING, ERROR. Events persist to Postgres and fan out over a WebSocket, so the arena animates as it happens.
When the clock runs out each team's workdir is walked recursively and the files are captured — 500 KB per file, 5 MB per team.
Before judging, a human-readable summary is written per team, mapping the files that were actually produced back to the rubric criteria.
An AI cross-judge reads the real deliverables and scores each criterion with written commentary. A heuristic execution-based scorer runs alongside as a fallback. The judge model is pinned — claude-opus-5 — so scores stay comparable over time.
Synthesis (blend the best ideas from every team, attributed per criterion), the Forge, a 65-second ESPN-style recap reel, or a re-judge in adversarial mode against a second model.
A Canvas 2D broadcast view. Each team is an armoured gladiator whose posture is driven by its own event stream — file writes strike, tool calls charge, errors land as hits. Momentum meter, phase chip, winner sequence.
Per-criterion scores with written commentary, from the real files. Adversarial mode adds a second judge on a different model and averages the two.
Across Claude, Codex and Gemini, with per-team model pinning. Nine personas ship seeded; build more in the Armory.
Run the loop repeatedly. Round-robin plays every pair; Swiss pairs by win count each round and breaks ties on Buchholz. Standings, round pairings and match history included.
34 artifact types across 7 domains. A run generates 3 universal artifacts, 3–4 domain artifacts chosen by a classifier and filtered for relevance, and 3 starter-kit artifacts when the deliverable is code — so roughly 6–10 per run. Runs stack; download one or the lot as a ZIP.
Every finished competition replays from its persisted event log. Spectator mode is a standalone fullscreen broadcast with no controls, for a second monitor or a projector. Optional commentary agent narrates the match in one-liners.
AI brief generator with domain intake, clarifying questions and a seven-rule quality check. Score spread, ties and expected-vs-produced file delivery are recorded per competition and fed back into the generator's prompt.
Agents run with permissions fully relaxed — that is what makes them useful and what makes isolation matter. Each team's CLI runs in a container with only its workdir mounted, capped at 2 GB RAM and 1 CPU.
Commands are taken verbatim from the repo README. The CLI path skips Docker, which is why it works before you have built the sandbox image.
# sign in to the CLIs you want to race — once $ npm i -g @anthropic-ai/claude-code && claude $ npm i -g @openai/codex && codex login $ npm i -g @google/gemini-cli && gemini # the arena itself $ git clone https://github.com/kikostefanov-lab/Arena4Ai $ cd agentarena && npm install $ createdb arena $ DATABASE_URL=postgresql://localhost/arena \ npm run db:migrate --workspace=packages/orchestrator
$ DATABASE_URL=postgresql://localhost/arena \ npx tsx packages/orchestrator/src/cli.ts run \ briefs/fizzbuzz-cli.yml \ --team-a claude:architect \ --team-b gemini:speedrunner \ --skip-sandbox \ --time-limit 120000 # or watch it live in the web UI $ npm run dev --workspace=packages/web # → http://localhost:3001
Self-hosted means the constraints are yours to plan around. These are the real ones, straight from the README.
| Requirement | Notes |
|---|---|
| Node.js ≥ 22 | Enforced by engines; .nvmrc pins 22. |
| npm ≥ 10.9 | The repo is an npm workspaces monorepo. |
| PostgreSQL | A local install is fine. Docker is not required for the database. |
| claude CLI | Required, always. Point CLAUDE_BIN at it if it lives somewhere unusual. |
| One competitor CLI | claude, codex and/or gemini on PATH and already signed in. |
| Docker | Optional for CLI runs. Effectively required for the web UI. |
Nothing to sign up for, nothing to pay, no key to hand over. If you already have an agent CLI signed in, you already have everything Arena4Ai needs.