whatisgithub

What is duel-agents?

2arons/duel-agents — explained in plain English

Analysis updated 2026-05-18

474TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A routing layer that sends your AI coding prompts to multiple models at once and picks the cheapest response that still meets quality.

Mindmap

mindmap
  root((Duel Agents))
    What it does
      Routes prompts to multiple models
      Picks cheapest good response
    Tech stack
      TypeScript
      SDK
    Use cases
      Install into coding tools
      Build custom integrations
      Cut AI costs
    Audience
      Developers
    Setup
      Paid subscription needed
      Installer for four tools

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install the Duel Agents plugin into Claude Code, Cursor, Codex CLI, or OpenClaw to route prompts through cost comparison.

USE CASE 2

Build a custom tool on the Duel Agents API using the SDK's OpenAI or Anthropic style client.

USE CASE 3

Reduce AI coding costs by letting the service pick the cheapest model that meets a quality bar automatically.

What is it built with?

TypeScript

How does it compare?

2arons/duel-agentsglassflow/clickhouse-etlsalhanabil/cloakbrowser
Stars474474479
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardeasy
Complexity2/54/53/5
Audiencedeveloperdatadeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires a paid Duel Agents subscription and API key, does not work with your own Anthropic or OpenAI keys.

Free to use, modify, and redistribute for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Duel Agents is a routing layer for AI coding tools that sends your prompts to multiple AI models at once and picks the cheapest response that still meets a quality bar. The idea is that you do not always need the most expensive model for every task, and a system that compares answers across models can save money without noticeably reducing quality. This repository provides the client-side tools: an installer, a TypeScript SDK, and plugins for popular AI coding environments. All requests route through the Duel Agents hosted service at duelagents.com, which requires a paid subscription and an API key from their dashboard. You cannot use your own Anthropic or OpenAI keys directly with these integrations. The installer supports four tools: Claude Code, Cursor, Codex CLI, and OpenClaw. Running one command sets up whichever tools you want. For Cursor, the setup writes your Duel API key to the project environment and points Cursor at the Duel proxy URL instead of the default AI provider. For Codex CLI and OpenClaw, it patches configuration files so those tools send requests to the Duel endpoint. For Claude Code, a plugin is installed directly into the Claude Code tool. For developers who want to build their own tools on top of the service, the SDK provides an API client that accepts both OpenAI-style and Anthropic-style request formats. You use the model name "duel-auto" and the service handles selecting and comparing underlying models. Any tool that supports a custom OpenAI-compatible base URL can also connect by pointing it at the Duel proxy endpoint. The codebase is organized into three packages: a core validation and configuration layer, the installer CLI, and the API SDK. It is released under the MIT license. The README does not describe the internal model comparison algorithm or pricing in detail beyond pointing to the dashboard.

Copy-paste prompts

Prompt 1
Install the Duel Agents plugin into Cursor and point it at my API key.
Prompt 2
Use the Duel Agents SDK to send a request with model set to duel-auto.
Prompt 3
Explain how Duel Agents decides which model response meets the quality bar.
Prompt 4
Set up the Duel Agents installer for Claude Code and Codex CLI in one command.

Frequently asked questions

What is duel-agents?

A routing layer that sends your AI coding prompts to multiple models at once and picks the cheapest response that still meets quality.

What language is duel-agents written in?

Mainly TypeScript. The stack also includes TypeScript.

What license does duel-agents use?

Free to use, modify, and redistribute for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is duel-agents to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is duel-agents for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.