monkeydust/rightmind

Multi-agent LLM advisory platform for complex decision-making.

11

stars

80

commits

TypeScript

primary language

Sep 1, 2026

updated

README

RightMind

One AI gives you one perspective. RightMind makes them argue first.

You know when you ask ChatGPT something and it gives you a confident, polished answer? It's usually pretty good. But nobody pushed back on it. Nobody said "hang on, what about..." or "you're ignoring the fact that...". You just got one model's take and that was it.

RightMind takes your question and throws it at multiple AI models (Claude, GPT, Gemini, DeepSeek, Grok) running in structured workflows. They debate, stress-test, and synthesise before anything reaches you. The argument already happened. You just get the result.

See it in action

https://github.com/user-attachments/assets/91ec217e-3f54-434e-bc2f-a0661a6f1a06

🔊 Watch with voiceover walkthrough →

How it works

1. Refine - You describe your problem roughly. A lightweight model asks you targeted questions (budget? timeline? constraints?) and figures out what type of problem you have. It picks the best strategy for you automatically.

2. Analyse - Your challenge goes to a panel of AI agents, each on a different model. Depending on the strategy, they might work independently, argue adversarially, negotiate towards consensus, or break the problem into pieces. Every agent can search the web.

3. Synthesise - A Judge reads everything the agents produced and writes the final report. Where they agreed, where they disagreed, what the verdict is, and what you should actually do next.

4. Follow up - Read the report, then ask follow-up questions. Want to drill into something specific? Challenge a conclusion? Each follow-up runs through the same multi-agent pipeline and sees the full conversation history.

Four strategies

Different problems need different approaches.

StrategyHow it worksGood for
🏛️ Consensus BoardFive specialists analyse independently, then a judge pulls it together. Based on Mixture-of-Agents.Open-ended strategic questions
🔬 Deep DiveA manager breaks your challenge into sub-tasks, specialists tackle each one in depth, then it's all integrated. Based on hierarchical decomposition.Complex problems with lots of dimensions
⚔️ Stress TesterSomeone builds the case, a devil's advocate tears it apart, a refiner strengthens what survives. Capped at 2 rounds so it doesn't go off the rails.When you've already got a plan and want it pressure-tested
🤝 Round TableMulti-round discussion where agents score how much they agree or disagree with each other. Confidence scores feed forward into the next round. Role-anchored so nobody just caves to peer pressure.Nuanced stuff that needs genuine negotiation

🔮 All Angles runs all four at once, then a Meta-Judge does cross-strategy analysis. It produces a decision alignment matrix showing where strategies agree (probably right) and where they don't (genuine uncertainty you need to think about).

Why different models matter

This uses models from five different providers: Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek R1, and xAI Grok. Each was trained on different data, with different architectures, by different teams with different priorities. Research shows that this kind of architectural diversity produces genuinely independent reasoning. That's what you want when you're trying to surface blind spots.

Who's on the panel

Models are pinned per role in src/strategies/*.md — change them there, no code required. Current roster (refreshed 2026-07-30):

StrategyAgentsJudge
🏛️ Consensus BoardRisk claude-opus-5 · Growth gpt-5.6-terra · Ops gemini-3.5-flash-lite · Technical deepseek-r1 · Second-Order Effects grok-4.3claude-opus-5
🔬 Deep DiveManager gpt-5.6-terra · Workers gemini-3.5-flash-litegpt-5.6-terra
⚔️ Stress TesterProposer claude-opus-5 · Devil's Advocate grok-4.3 · Refiner claude-opus-5gpt-5.6-terra
🤝 Round TableMarket gpt-5.6-terra · Financial claude-opus-5 · Industry gemini-3.5-flash-lite · Human Factors deepseek-r1 · Contrarian grok-4.3claude-opus-5
🔮 All Angles(runs the four above)Meta-Judge claude-opus-5

🐉 Dragon mode — the same panel, ~14× cheaper

Tick Dragon on the submit bar and the whole panel switches to a cheaper roster of open-weight models. Same strategies, same prompts, same structure — different labs.

PremiumDragon
Consensus Board$0.90 / 8 min$0.06 / 4.5 min
All Angles~$3.60$0.53

Measured on the identical challenge, not estimated. Dragon came out 14× cheaper and nearly 2× faster — the cheaper models also think and search less, so they burn far fewer tokens.

The diversity argument survives intact, because Dragon is still six independent labs: DeepSeek, MiniMax, Tencent, ByteDance, Moonshot, and Zhipu. It's arguably the sharper test of the whole premise — if a heterogeneous panel of cheap models beats one expensive model, that's the strongest version of the claim.

Jobs are labelled with a 🐉 DRAGON badge so you always know which roster produced a report. Worth knowing: these models are served by their respective labs' providers, which may matter if you have data-residency or procurement constraints.

What it actually costs

A measured Consensus Board run (5 agents + judge, a real strategy question) came to $0.90 and 8 minutes — 112k tokens. Worth knowing where that goes: the two Claude Opus 5 calls were 95% of the bill. Opus 5 thinks by default and searches the web hard, so on the same prompt it pulled 21k input tokens where Gemini pulled 321.

If that's too rich, the levers are in src/strategies/*.md and src/lib/llm.ts: swap Opus 5 for claude-sonnet-5, pass reasoning: { effort: "low" }, or set webSearch: false on roles that don't need live data. Cost and latency estimates shown in the UI are measured for Consensus Board and extrapolated for the rest — treat the others as rough.

Things worth knowing about

  • Smart Refine classifies your problem type and picks the strategy, so you don't need to know anything about multi-agent AI
  • Follow-up conversations that chain together, each one seeing the full history
  • Live web search on every agent so you get current data, not stale training knowledge
  • PDF export for any analysis
  • Reasoning traces so you can see what each model was actually thinking, not just the polished output
  • Drift prevention re-injects the original challenge at every debate stage so agents don't wander off topic
  • Role anchoring so a Financial Analyst stays a Financial Analyst even when three other agents disagree
  • Confidence scoring in Round Table where agents score their certainty and those scores feed into the next round
  • Minority dissent gets flagged, not buried. Consensus doesn't equal correctness. Informed by conformal social choice theory
  • File attachments for PDFs, images, documents. Every agent in the strategy sees the file
  • Demo mode if you just want to poke around. Type demo@demo.com on the login page

The research behind it

Every design decision maps to published multi-agent AI research:


Getting started

You'll need

1. Clone and install

git clone https://github.com/monkeydust/rightmind.git
cd rightmind
npm install

2. Environment variables

Create a .env file:

# Database (SQLite, default path)
DATABASE_URL="file:./dev.db"

# OpenRouter - your LLM gateway key
OPENROUTER_API_KEY="sk-or-v1-..."

# Auth.js - generate with: npx auth secret
AUTH_SECRET="<random-secret>"
AUTH_URL="http://localhost:3000"

# (Optional) Resend - for production email delivery
# AUTH_RESEND_KEY="re_..."

3. Database setup

npx prisma migrate dev
npx prisma generate
npx tsx --tsconfig tsconfig.json prisma/seed.ts  # edit prisma/seed.ts with your email first

4. Run it

npm run dev

Open http://localhost:3000.

Authentication

Magic link login via Auth.js (NextAuth v5):

  1. Hit any /advisor route and you'll get redirected to /login
  2. Enter your email, click Send magic link
  3. In dev: the link prints to terminal
  4. In prod: emailed via Resend (needs AUTH_RESEND_KEY)
  5. Demo: type demo@demo.com for instant access, no email needed
  6. Sessions last 30 days

BYOK (Bring Your Own Key)

Each user has their own OpenRouter API key stored against their account:

  • You pay for your own usage
  • Keys persist across sessions
  • Falls back to the server's OPENROUTER_API_KEY if no user key is set

Architecture

src/
├── app/
│   ├── login/              # Magic link auth pages
│   ├── advisor/            # Dashboard, strategy pages, job viewer
│   │   ├── jobs/           # Job history (per-user)
│   │   ├── strategy/[id]/  # Strategy detail pages
│   │   └── why/            # Platform explainer & research
│   ├── api/
│   │   ├── auth/
│   │   │   ├── [...nextauth]/  # Auth.js route handler
│   │   │   └── demo/           # Instant demo login endpoint
│   │   └── advisor/
│   │       ├── submit/     # POST - create a new analysis job
│   │       ├── jobs/       # GET - list jobs; GET [id] - job detail + SSE
│   │       ├── jobs/[id]/follow-up/   # POST - follow-up conversations
│   │       ├── jobs/[id]/pdf/         # GET - PDF export
│   │       ├── jobs/[id]/reasoning/   # GET - raw reasoning traces
│   │       ├── jobs/[id]/transcript/  # GET - full agent transcript
│   │       ├── refine/     # POST - AI-powered challenge refinement
│   │       └── strategies/ # GET - list available strategies
│   ├── providers.tsx       # SessionProvider wrapper
│   └── layout.tsx          # Root layout
├── lib/
│   ├── llm.ts              # OpenRouter API client (BYOK)
│   ├── db.ts               # Prisma client singleton
│   ├── strategies.ts       # Strategy loader (markdown configs)
│   ├── types.ts            # Shared TypeScript types
│   ├── seed-demo.ts        # Demo fixture seeder
│   ├── demo-fixtures.json  # Pre-computed demo job results
│   └── orchestrators/      # Strategy execution engines
│       ├── multi-round-consensus.ts  # Consensus Board
│       ├── manager-worker.ts         # Deep Dive
│       ├── parallel-aggregate.ts     # Round Table
│       ├── sequential-debate.ts      # Stress Tester
│       └── all-angles.ts            # All Angles (meta)
├── components/
│   └── StrategyDiagram.tsx  # Visual strategy workflow diagrams
├── strategies/             # Strategy configs (markdown + frontmatter)
├── auth.ts                 # Auth.js config (magic link + Prisma adapter)
├── proxy.ts                # Route protection (Next.js 16 proxy)
└── generated/prisma/       # Prisma generated client (gitignored)

Scripts

CommandDescription
npm run devStart dev server (port 3000)
npm run buildProduction build
npm run startStart production server
npm run lintRun ESLint
npm run db:backupBackup SQLite database

Tech stack

  • Framework: Next.js 16 (App Router, Turbopack)
  • Auth: Auth.js v5 (magic link + demo login)
  • Database: SQLite + Prisma ORM
  • LLM Gateway: OpenRouter (Claude, GPT, Gemini, DeepSeek, Grok)
  • PDF: Puppeteer + Chromium (server-side)
  • Email: Resend (production only)
  • Styling: Vanilla CSS

Contributors

monkeydust

80 commits

monkeydust/rightmind

Multi-agent LLM advisory platform for complex decision-making.

11

stars

80

commits

TypeScript

primary language

Sep 1, 2026

updated

README

RightMind

One AI gives you one perspective. RightMind makes them argue first.

You know when you ask ChatGPT something and it gives you a confident, polished answer? It's usually pretty good. But nobody pushed back on it. Nobody said "hang on, what about..." or "you're ignoring the fact that...". You just got one model's take and that was it.

RightMind takes your question and throws it at multiple AI models (Claude, GPT, Gemini, DeepSeek, Grok) running in structured workflows. They debate, stress-test, and synthesise before anything reaches you. The argument already happened. You just get the result.

See it in action

https://github.com/user-attachments/assets/91ec217e-3f54-434e-bc2f-a0661a6f1a06

🔊 Watch with voiceover walkthrough →

How it works

1. Refine - You describe your problem roughly. A lightweight model asks you targeted questions (budget? timeline? constraints?) and figures out what type of problem you have. It picks the best strategy for you automatically.

2. Analyse - Your challenge goes to a panel of AI agents, each on a different model. Depending on the strategy, they might work independently, argue adversarially, negotiate towards consensus, or break the problem into pieces. Every agent can search the web.

3. Synthesise - A Judge reads everything the agents produced and writes the final report. Where they agreed, where they disagreed, what the verdict is, and what you should actually do next.

4. Follow up - Read the report, then ask follow-up questions. Want to drill into something specific? Challenge a conclusion? Each follow-up runs through the same multi-agent pipeline and sees the full conversation history.

Four strategies

Different problems need different approaches.

StrategyHow it worksGood for
🏛️ Consensus BoardFive specialists analyse independently, then a judge pulls it together. Based on Mixture-of-Agents.Open-ended strategic questions
🔬 Deep DiveA manager breaks your challenge into sub-tasks, specialists tackle each one in depth, then it's all integrated. Based on hierarchical decomposition.Complex problems with lots of dimensions
⚔️ Stress TesterSomeone builds the case, a devil's advocate tears it apart, a refiner strengthens what survives. Capped at 2 rounds so it doesn't go off the rails.When you've already got a plan and want it pressure-tested
🤝 Round TableMulti-round discussion where agents score how much they agree or disagree with each other. Confidence scores feed forward into the next round. Role-anchored so nobody just caves to peer pressure.Nuanced stuff that needs genuine negotiation

🔮 All Angles runs all four at once, then a Meta-Judge does cross-strategy analysis. It produces a decision alignment matrix showing where strategies agree (probably right) and where they don't (genuine uncertainty you need to think about).

Why different models matter

This uses models from five different providers: Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek R1, and xAI Grok. Each was trained on different data, with different architectures, by different teams with different priorities. Research shows that this kind of architectural diversity produces genuinely independent reasoning. That's what you want when you're trying to surface blind spots.

Who's on the panel

Models are pinned per role in src/strategies/*.md — change them there, no code required. Current roster (refreshed 2026-07-30):

StrategyAgentsJudge
🏛️ Consensus BoardRisk claude-opus-5 · Growth gpt-5.6-terra · Ops gemini-3.5-flash-lite · Technical deepseek-r1 · Second-Order Effects grok-4.3claude-opus-5
🔬 Deep DiveManager gpt-5.6-terra · Workers gemini-3.5-flash-litegpt-5.6-terra
⚔️ Stress TesterProposer claude-opus-5 · Devil's Advocate grok-4.3 · Refiner claude-opus-5gpt-5.6-terra
🤝 Round TableMarket gpt-5.6-terra · Financial claude-opus-5 · Industry gemini-3.5-flash-lite · Human Factors deepseek-r1 · Contrarian grok-4.3claude-opus-5
🔮 All Angles(runs the four above)Meta-Judge claude-opus-5

🐉 Dragon mode — the same panel, ~14× cheaper

Tick Dragon on the submit bar and the whole panel switches to a cheaper roster of open-weight models. Same strategies, same prompts, same structure — different labs.

PremiumDragon
Consensus Board$0.90 / 8 min$0.06 / 4.5 min
All Angles~$3.60$0.53

Measured on the identical challenge, not estimated. Dragon came out 14× cheaper and nearly 2× faster — the cheaper models also think and search less, so they burn far fewer tokens.

The diversity argument survives intact, because Dragon is still six independent labs: DeepSeek, MiniMax, Tencent, ByteDance, Moonshot, and Zhipu. It's arguably the sharper test of the whole premise — if a heterogeneous panel of cheap models beats one expensive model, that's the strongest version of the claim.

Jobs are labelled with a 🐉 DRAGON badge so you always know which roster produced a report. Worth knowing: these models are served by their respective labs' providers, which may matter if you have data-residency or procurement constraints.

What it actually costs

A measured Consensus Board run (5 agents + judge, a real strategy question) came to $0.90 and 8 minutes — 112k tokens. Worth knowing where that goes: the two Claude Opus 5 calls were 95% of the bill. Opus 5 thinks by default and searches the web hard, so on the same prompt it pulled 21k input tokens where Gemini pulled 321.

If that's too rich, the levers are in src/strategies/*.md and src/lib/llm.ts: swap Opus 5 for claude-sonnet-5, pass reasoning: { effort: "low" }, or set webSearch: false on roles that don't need live data. Cost and latency estimates shown in the UI are measured for Consensus Board and extrapolated for the rest — treat the others as rough.

Things worth knowing about

  • Smart Refine classifies your problem type and picks the strategy, so you don't need to know anything about multi-agent AI
  • Follow-up conversations that chain together, each one seeing the full history
  • Live web search on every agent so you get current data, not stale training knowledge
  • PDF export for any analysis
  • Reasoning traces so you can see what each model was actually thinking, not just the polished output
  • Drift prevention re-injects the original challenge at every debate stage so agents don't wander off topic
  • Role anchoring so a Financial Analyst stays a Financial Analyst even when three other agents disagree
  • Confidence scoring in Round Table where agents score their certainty and those scores feed into the next round
  • Minority dissent gets flagged, not buried. Consensus doesn't equal correctness. Informed by conformal social choice theory
  • File attachments for PDFs, images, documents. Every agent in the strategy sees the file
  • Demo mode if you just want to poke around. Type demo@demo.com on the login page

The research behind it

Every design decision maps to published multi-agent AI research:


Getting started

You'll need

1. Clone and install

git clone https://github.com/monkeydust/rightmind.git
cd rightmind
npm install

2. Environment variables

Create a .env file:

# Database (SQLite, default path)
DATABASE_URL="file:./dev.db"

# OpenRouter - your LLM gateway key
OPENROUTER_API_KEY="sk-or-v1-..."

# Auth.js - generate with: npx auth secret
AUTH_SECRET="<random-secret>"
AUTH_URL="http://localhost:3000"

# (Optional) Resend - for production email delivery
# AUTH_RESEND_KEY="re_..."

3. Database setup

npx prisma migrate dev
npx prisma generate
npx tsx --tsconfig tsconfig.json prisma/seed.ts  # edit prisma/seed.ts with your email first

4. Run it

npm run dev

Open http://localhost:3000.

Authentication

Magic link login via Auth.js (NextAuth v5):

  1. Hit any /advisor route and you'll get redirected to /login
  2. Enter your email, click Send magic link
  3. In dev: the link prints to terminal
  4. In prod: emailed via Resend (needs AUTH_RESEND_KEY)
  5. Demo: type demo@demo.com for instant access, no email needed
  6. Sessions last 30 days

BYOK (Bring Your Own Key)

Each user has their own OpenRouter API key stored against their account:

  • You pay for your own usage
  • Keys persist across sessions
  • Falls back to the server's OPENROUTER_API_KEY if no user key is set

Architecture

src/
├── app/
│   ├── login/              # Magic link auth pages
│   ├── advisor/            # Dashboard, strategy pages, job viewer
│   │   ├── jobs/           # Job history (per-user)
│   │   ├── strategy/[id]/  # Strategy detail pages
│   │   └── why/            # Platform explainer & research
│   ├── api/
│   │   ├── auth/
│   │   │   ├── [...nextauth]/  # Auth.js route handler
│   │   │   └── demo/           # Instant demo login endpoint
│   │   └── advisor/
│   │       ├── submit/     # POST - create a new analysis job
│   │       ├── jobs/       # GET - list jobs; GET [id] - job detail + SSE
│   │       ├── jobs/[id]/follow-up/   # POST - follow-up conversations
│   │       ├── jobs/[id]/pdf/         # GET - PDF export
│   │       ├── jobs/[id]/reasoning/   # GET - raw reasoning traces
│   │       ├── jobs/[id]/transcript/  # GET - full agent transcript
│   │       ├── refine/     # POST - AI-powered challenge refinement
│   │       └── strategies/ # GET - list available strategies
│   ├── providers.tsx       # SessionProvider wrapper
│   └── layout.tsx          # Root layout
├── lib/
│   ├── llm.ts              # OpenRouter API client (BYOK)
│   ├── db.ts               # Prisma client singleton
│   ├── strategies.ts       # Strategy loader (markdown configs)
│   ├── types.ts            # Shared TypeScript types
│   ├── seed-demo.ts        # Demo fixture seeder
│   ├── demo-fixtures.json  # Pre-computed demo job results
│   └── orchestrators/      # Strategy execution engines
│       ├── multi-round-consensus.ts  # Consensus Board
│       ├── manager-worker.ts         # Deep Dive
│       ├── parallel-aggregate.ts     # Round Table
│       ├── sequential-debate.ts      # Stress Tester
│       └── all-angles.ts            # All Angles (meta)
├── components/
│   └── StrategyDiagram.tsx  # Visual strategy workflow diagrams
├── strategies/             # Strategy configs (markdown + frontmatter)
├── auth.ts                 # Auth.js config (magic link + Prisma adapter)
├── proxy.ts                # Route protection (Next.js 16 proxy)
└── generated/prisma/       # Prisma generated client (gitignored)

Scripts

CommandDescription
npm run devStart dev server (port 3000)
npm run buildProduction build
npm run startStart production server
npm run lintRun ESLint
npm run db:backupBackup SQLite database

Tech stack

  • Framework: Next.js 16 (App Router, Turbopack)
  • Auth: Auth.js v5 (magic link + demo login)
  • Database: SQLite + Prisma ORM
  • LLM Gateway: OpenRouter (Claude, GPT, Gemini, DeepSeek, Grok)
  • PDF: Puppeteer + Chromium (server-side)
  • Email: Resend (production only)
  • Styling: Vanilla CSS

Contributors

monkeydust

80 commits

Languages

TypeScript

73.1%

HTML

22.4%

CSS

3.8%