DUALMIND_TOKEN (how to get one).
dualmind-battle
.env
battle.mjs
battle.py
DUALMIND_TOKEN=... in .env (and .env in .gitignore), then follow along in JavaScript (Node 18+) or Python 3.9+.
1
Create a thread (optional)
Threads keep battles together and make them shareable. Skip this step if you don’t need history.
2
Start a blind battle
Leave
model1 and model2 out so the Arena picks two random models.3
Keep the names hidden
The response includes each side’s
model and an arena.models summary so you can reveal them later. For a fair vote, don’t show these until the user has voted:If a model is unreachable or takes longer than 60 seconds, a basic fallback model answers instead and the reply starts with a [System Note]. You’d be judging the fallback, so consider skipping the vote on that battle.
4
Vote
left means agent1 won and right means agent2 won. You can also send tie or both-bad. One vote per user per comparison.5
Reveal
Now show the names:
You’ve built the full Arena loop: battle, blind vote, reveal. Your vote counts on the leaderboard like any other.
Variations
Side by Side: choose both models
Side by Side: choose both models
Pass both
model1 and model2 (a modelName or modelId from List models):Topper: challenge the leader
Topper: challenge the leader
Same settings for both sides
Same settings for both sides
system, maxTokens and temperature apply to both models:Start a battle
Full request and response reference.
Submit a vote
Vote options and errors.