https://AgentsArena.live
Head-to-head agentic task evaluation. Two anonymous LLMs get the same task, you inspect their reasoning traces and vote for the better agent.
index.html task list
task.html battle page
style.css
app.js index page logic
task.js task page logic
schema.sql D1 init (run once)
functions/
api/
tasks.js GET /api/tasks[?id=N]
run.js POST /api/run?task_id=N
vote.js POST /api/vote
Pages → Workers & Pages → D1 → Create database (e.g. agent-arena)
Run schema.sql in the D1 Console tab.
Pages → your project → Settings → Functions → D1 database bindings
Variable name: DB
Database: agent-arena
Pages → Settings → Environment variables → Production (and Preview if needed)
| Variable | Example value |
|---|---|
| MODEL_A_NAME | claude-3-5-haiku-20241022 |
| MODEL_A_URL | https://api.anthropic.com/v1/messages |
| MODEL_A_KEY | sk-ant-... |
| MODEL_A_PROVIDER | anthropic |
| MODEL_B_NAME | gpt-4o-mini |
| MODEL_B_URL | https://api.openai.com/v1/chat/completions |
| MODEL_B_KEY | sk-... |
| MODEL_B_PROVIDER | openai |
MODEL_*_PROVIDER can be anthropic or openai (OpenAI-compatible endpoint).
Push to your connected git repo or drag-drop to Pages.
- User picks a task from the list
- Clicks "Run Both Agents" → POST /api/run calls both models in parallel
- Traces are parsed (THINK / ACTION / RESULT steps) and rendered side-by-side
- User votes → POST /api/vote stores the result in D1 and reveals model names
Edit functions/api/tasks.js — the TASKS array. Each task needs:
id(unique string)name,description,categoryprompt— the full prompt sent to the agent, using THINK/ACTION/RESULT/OUTPUT format