LlamaIndex Llms Integration: Duel Agents
Duel Agents routes each prompt against multiple models and bills the cheapest answer that still wins, behind an OpenAI-compatible proxy.
Installation
pip install llama-index-llms-duel
Create an API key at duelagents.com/dashboard/settings (an active subscription is required) and set it:
export DUEL_API_KEY="duel_<prefix>_<secret>"
Usage
from llama_index.llms.duel import DuelLLM
llm = DuelLLM(model="duel-auto")
resp = llm.complete("Explain concurrent agents in one sentence.")
print(resp)
Chat:
from llama_index.core.llms import ChatMessage
messages = [
ChatMessage(role="system", content="You answer concisely."),
ChatMessage(role="user", content="What is model routing?"),
]
print(llm.chat(messages))
duel-auto lets Duel pick the model. You can also pass a specific model name
(for example gpt-4o-mini or claude-3-5-haiku-latest) to route to that
provider.
License
MIT
Metadata
Release files for llama-index-llms-duel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llama_index_llms_duel-0.1.0.tar.gz | 3.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_index_llms_duel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / llama_index_llms_duel-0.1.0.tar.gz
| Download URL | llama_index_llms_duel-0.1.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5e24da1f16fe89171beb753674594c03203ea2bf0ac8bd3704faa2274ff9b1f
|
|
BLAKE2b-256 checksum How to use checksums |
ae03b84125a0eabe1b29f56bb6fdfbaa824ecef26384e18c8b8e3ac4ba8266e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / llama_index_llms_duel-0.1.0-py3-none-any.whl
| Download URL | llama_index_llms_duel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10ce98f895f2d28a312869e5e4405ede0926abc54c70ef92a4481dea9fa4134b
|
|
BLAKE2b-256 checksum How to use checksums |
e5e8d364a2f2ff796351d065eb078700cfcd218b88d9f8050ead1fd0682e01cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for llama-index-llms-duel 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.