AI agents debate two options and return a winner with confidence.
- https://splitdecision.vercel.app/
- Feel free to use it until I have credits left.
SplitDecision lets you compare two options (for example React vs Svelte) and watch a structured 2-round debate between 4 agent personas:
- The Analyst
- The Contrarian
- The Pragmatist
- The Wildcard
After both rounds, a verdict model picks a winner and assigns a confidence score.
- Real-time token streaming for all agent responses and verdict
- Two debate rounds (initial takes + rebuttals)
- 9 themed debate panels:
- Default Panel
- Startup Bros
- Academic Panel
- Bar Argument
- Shark Tank
- Reddit Thread
- Courtroom Trial
- Sports Commentary
- Philosophy Seminar
- Input validation before debate starts
- Content moderation check on submitted options
- Server-side OpenAI key usage via environment variables
- Fixed model:
gpt-4o-mini - IP-based rate limiting
- VS splash animation, verdict reveal animation, and confetti
- Share modal: copy link, export PNG, share to X
- Trending feed backed by Redis (
/api/comparisons)
- Next.js 15 (App Router)
- React 19
- TypeScript
- Tailwind CSS
- Framer Motion
- OpenAI SDK
- Upstash Redis + Upstash Ratelimit
- html2canvas
POST /api/validate- validates comparison + moderates contentPOST /api/stream- streams agent/verdict outputGET /api/comparisons- fetches recent comparisonsPOST /api/comparisons- saves completed comparison results
app/
page.tsx # main UI and debate orchestration
api/
stream/route.ts # server-side streaming proxy + rate limit
validate/route.ts # validation + moderation
comparisons/route.ts # trending storage/retrieval
components/
ComparisonInput.tsx
AgentMessage.tsx
VerdictCard.tsx
VSSplash.tsx
ShareCard.tsx
TrendingFeed.tsx
lib/
config.ts # agents, themes, prompts, parser config
stream.ts # browser helpers for API validation/streaming
rate-limit.ts # Upstash fixed-window limiter
redis.ts # Redis helpers for recent comparisons
types.ts
npm installCopy example file:
cp .env.local.example .env.localSet values:
OPENAI_API_KEY=sk-...
DAILY_FREE_LIMIT=50
UPSTASH_REDIS_REST_URL=https://...
UPSTASH_REDIS_REST_TOKEN=...Notes:
OPENAI_API_KEYis used by server routes for all AI calls.DAILY_FREE_LIMITis a request limit per IP in a 24h window.- If
UPSTASH_REDIS_REST_URL/UPSTASH_REDIS_REST_TOKENare missing locally, Next.js may show Upstash warnings during build/start.
npm run devOpen http://localhost:3000.
npm run devnpm run buildnpm run startnpm run lint(currently prompts for ESLint setup in this repo)
Deployed on Vercel: https://splitdecision.vercel.app/
To deploy your own instance, add the same env vars in Vercel project settings.
MIT