Skip to content

Repository files navigation

AgentArena ⚔️

AgentArena is a self-hosted, local web application for running blind, head-to-head battles between locally-running LLMs via Ollama. Two models receive the same prompt anonymously, and an AI judge or human decides the winner, driving a live Elo leaderboard.

Two responses walk into an arena. Only one leaves with rating points.


✨ Features

  • 🥊 Blind Head-to-Head Battles: Positions randomized (50/50) and model names hidden until voted to eliminate bias.
  • 🏆 Elo Leaderboard: Standard Chess Elo algorithm (K=32) with gold/silver/bronze podiums, provisional rating badges (<20 battles), and win-rate category filters.
  • Concurrent Model Calling: Local models are queried in parallel for minimal latency.
  • 🧠 Dual Judging Modes: Let a local AI model judge with structured JSON reasoning, or decide manually.
  • 📊 Detailed Analytics: Rating history sparklines, interactive line charts (Recharts), and head-to-head match records.
  • 📜 Full History: Expandable battle logs with side-by-side markdown rendering and code syntax highlighting.
  • ⚙️ Task & Model Management: Add/archive local Ollama models, bulk import prompt banks, and configure default judge behavior.
  • 🔒 100% Offline & Private: Zero external API calls. SQLite database (agentarena.db) auto-created and auto-seeded locally.

🛠️ Stack

  • Framework: Next.js 14+ (App Router, TypeScript)
  • Styling: Tailwind CSS
  • Components: shadcn/ui & Lucide React Icons
  • Animation: Framer Motion
  • Charts: Recharts
  • Database: SQLite (better-sqlite3, WAL mode)
  • Model Inference: Local Ollama HTTP API (http://localhost:11434)

🚀 Quick Start

1. Prerequisites

Make sure Ollama is installed and running on your machine:

ollama serve

Pull at least two local models:

ollama pull qwen2.5-coder:7b
ollama pull llama3.1:8b

2. Installation & Setup

# Clone the repository
git clone https://github.com/<your-username>/AgentArena.git
cd AgentArena

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:3000 in your browser.


🧪 Testing

Run the isolated Elo unit test suite:

npx tsx src/lib/elo.test.ts

Build for production:

npm run build

📄 License

MIT License. Built for local LLM evaluation.

About

AgentArena is a self-hosted, local web application for running blind, head-to-head battles between locally-running LLMs via Ollama.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages