Open source · self-hosted No account No API key

Two AI agents enter. A cross-judge scores their work.

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

The 63-second cut

This is what a match looks like.

Recorded from the running app. The 11 MB reel loads when this section reaches you — or on tap.

The part that matters

There is no API key. Arena4Ai spawns the agent CLIs already installed on your machine, and they use whatever auth they already have.

01 · YOUR BINARIES

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.

02 · YOUR MACHINE

Postgres, the orchestrator and the web UI all run locally. Nothing phones home, because there is nowhere for it to phone.

03 · YOUR SETUP STEP

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.

One competition

A single pass through seven stages.

Tournaments run this loop repeatedly — round-robin plays every pair, Swiss pairs by win count each round and breaks ties on Buchholz.

01

Brief

A YAML or DB-stored document: problem statement, constraints, deliverables, a time limit and a weighted rubric. Twelve example briefs ship in briefs/.

02

Launch

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.

03

Race

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.

04

Collect

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.

05

Present

Before judging, a human-readable summary is written per team, mapping the files that were actually produced back to the rubric criteria.

06

Judge

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.

07

Afterwards — all optional, all human-triggered

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.

What is in the box

Built like a broadcast, not a benchmark script.

Live arena

Watch them think, in real time

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.

Cross-judge

Scored on what shipped

Per-criterion scores with written commentary, from the real files. Adversarial mode adds a second judge on a different model and averages the two.

team a95%
team b78%
Providers

Head-to-head, 3-way, 4-way

Across Claude, Codex and Gemini, with per-team model pinning. Nine personas ship seeded; build more in the Armory.

claude:architectcodex:standardgemini:speedrunnerclaude:adversarialclaude:researcher
Tournaments

Round-robin and Swiss

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.

The Forge

Turn the winning work into a plan

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.

Replay & spectate

Scrub it back at 1×–10×

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.

Authoring

A brief library that grades itself

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.

Isolation

Docker sandbox per team

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.

Screens from the running app

Not a mockup.

The live arena at the moment a match resolves: two gladiators, a winner banner reading VICTOR GEMINI, per-team score bars and a per-criterion score table below.
The arena as a match resolves — winner banner, momentum meter, per-criterion scores.
The Arena4Ai competition gallery: a search field, state and model filters, and a list of competition cards each showing the brief name, the two competing agents and their scores.
The competition gallery — search, state and model filters, live health dot.
Quick start

Clone it, and race something in five minutes.

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.

1 · set it up
# 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
2 · first battle
$ 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
Before you clone

What it needs, and what it does not do yet.

Self-hosted means the constraints are yours to plan around. These are the real ones, straight from the README.

  • The claude CLI is required even for a Codex-vs-Gemini match — the judge, presenter, synthesizer, Forge, commentary and brief generator all shell out to it.
  • Web-UI runs are always sandboxed unless the operator opts out via the environment, so you either build arena-agent:latest yourself or start the server with ARENA_SKIP_SANDBOX=true.
  • Agents run with permissions fully relaxed. Read the sandbox section before you point it at anything you care about.
  • If you expose the orchestrator port beyond localhost, set ARENA_API_KEY. Left unset, auth is off — which is fine for local dev and nothing else.
RequirementNotes
Node.js ≥ 22Enforced by engines; .nvmrc pins 22.
npm ≥ 10.9The repo is an npm workspaces monorepo.
PostgreSQLA local install is fine. Docker is not required for the database.
claude CLIRequired, always. Point CLAUDE_BIN at it if it lives somewhere unusual.
One competitor CLIclaude, codex and/or gemini on PATH and already signed in.
DockerOptional for CLI runs. Effectively required for the web UI.
Free · self-hosted · yours

Star the repo. Clone it. Run it.

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.

Star on GitHub
12 example briefs 9 seeded personas 34 Forge artifact types Round-robin + Swiss