Duel-Agents  by 2aronS

Intelligent LLM routing for cost-effective inference

Created 2 weeks ago

New!

1,025 stars

Top 36.2% on SourcePulse

GitHubView on GitHub
Project Summary

Duel Agents provides an IDE-native routing layer for Large Language Models (LLMs), enabling users to run prompts against multiple models simultaneously and select the most cost-effective response that meets quality standards. It targets developers and researchers seeking to optimize LLM usage by automating model selection based on performance and price, offering significant cost savings and streamlined integration across various tools and applications.

How It Works

This project routes all LLM traffic through the duelagents.com/v1 API endpoint, requiring a specific Duel API key. It employs an intelligent routing mechanism that evaluates responses from multiple models, prioritizing the cheapest option that satisfies predefined quality criteria. The system includes an SDK for custom application development and integrates seamlessly with popular tools, offering both OpenAI-compatible and Anthropic-compatible interfaces for flexible adoption.

Quick Start & Requirements

  1. Obtain a Duel API key from the dashboard: https://duelagents.com/dashboard/settings.
  2. Set the API key as an environment variable: export DUEL_API_KEY=duel_<prefix>_<secret>.
  3. Install integrations using npx @duel-agents/install all.
  4. Verify the installation with npx @duel-agents/install doctor.

Highlighted Details

  • Provides direct integrations for Claude Code, Cursor, Codex CLI, and OpenClaw, simplifying LLM model switching.
  • Offers the @duel-agents/sdk for programmatic use in TypeScript applications, supporting both chat completions and message creation.
  • Supports OpenAI-compatible endpoints, allowing tools like Hermes Agent and Venice to leverage Duel Agents' routing capabilities.
  • Troubleshooting guide addresses common issues like invalid API keys, connection errors, and specific tool integration problems.

Maintenance & Community

The repository structure includes core packages (@duel-agents/core, @duel-agents/cli, @duel-agents/sdk) and an integrations/ directory. Development instructions involve standard npm install, npm run build, and npm test. Further details can be found in CONTRIBUTING.md. No specific community links (Discord, Slack) or notable contributors are mentioned in the README.

Licensing & Compatibility

The project is licensed under the MIT License. This permissive license generally allows for commercial use and integration into closed-source projects, with minimal restrictions beyond attribution.

Limitations & Caveats

Users must obtain and use a Duel API key; raw OpenAI or Anthropic API keys are not supported by these integrations. The service relies on the availability and performance of the duelagents.com/v1 proxy. Some integrations, like Cursor, require additional manual configuration beyond the installer script.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
1,090 stars in the last 15 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Kent Dodds Kent Dodds(Cofounder of Remix), and
10 more.

agentic by transitive-bullshit

0.0%
18k
AI agent stdlib for LLM-based TypeScript tooling
Created 3 years ago
Updated 4 months ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Magnus Müller Magnus Müller(Cofounder of Browser Use), and
86 more.

langchain by langchain-ai

0.3%
139k
Framework for building LLM-powered applications
Created 3 years ago
Updated 21 hours ago
Feedback? Help us improve.