Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Polymath X ๐Ÿง โœจ

Xpand your perspective.

A focused web application where Claude, GPT-4o, and Gemini debate any topic you choose, featuring DeepSeek-powered moderation, document context injection, and structured summaries.

Next.js TypeScript Convex OpenRouter Tailwind CSS


๐Ÿ“– Overview

Polymath X transforms the way you explore complex topics by orchestrating multi-model AI debates. Instead of relying on a single AI's perspective, Polymath X pits the world's leading foundation models (Claude, GPT-4o, and Gemini) against each other in structured, multi-round debates.

Whether you are evaluating a business strategy, exploring a philosophical dilemma, or seeking diverse perspectives on an uploaded document, Polymath X provides a rigorous, moderated environment to challenge assumptions and surface nuanced insights.

๐Ÿ“ธ Screenshots

Polymath X โ€” Main debate interface showing Settings panel, persona selectors, debate style, and topic suggestions

The main interface โ€” configure debate style (Socratic, Devil's Advocate, Steel-man), assign personas to Claude, GPT-4o, and Gemini, toggle Black Hat Mode, and enter any topic to begin a structured multi-model debate.


โœจ Key Features

  • Multi-Model Debates: Watch Claude, GPT-4o, and Gemini stream their arguments in parallel.
  • Configurable Personas & Styles: Tailor the debate style (e.g., Socratic, Devil's Advocate, Steel-man) and assign distinct personas to each model (e.g., Claude as an Ethicist, GPT-4o as a Pragmatist).
  • Document Context Injection: Upload PDFs, Word documents, or images. The system extracts the text and injects it directly into the debate context, even auto-suggesting topics based on the content.
  • DeepSeek Moderation: A dedicated moderator model guides the flow, asks follow-up questions in Round 2, and keeps the debate focused.
  • Black Hat Mode: Enable a stress-test lens that introduces a fourth, highly contrarian debater (powered by deepseek-reasoner) to actively find flaws in the prevailing arguments.
  • Cross-Device History Sync: Debate history is persisted seamlessly via Convex. Use a secure sync key to share your history across desktop and mobile devices.
  • AI Summaries & Judging: Export-friendly markdown summaries and formal verdicts delivered by a dedicated judging model.

๐Ÿ› ๏ธ Tech Stack

  • Framework: Next.js 14 (App Router)
  • UI & Styling: React 18, Tailwind CSS, Lucide Icons
  • Backend & Database: Convex for real-time state and history persistence
  • AI Orchestration: OpenRouter (for Claude, Gemini, DeepSeek) and OpenAI (for native GPT-4o streaming)
  • Client-side Parsing: pdfjs-dist and mammoth for local document extraction

๐Ÿš€ Getting Started

Prerequisites

Local Development

  1. Clone the repository:

    git clone https://github.com/limchinhan123/polymathx.git
    cd polymathx
  2. Set up environment variables:

    cp .env.example .env.local

    Edit .env.local to include your OpenRouter key, OpenAI key, and Convex dev URL.

  3. Install dependencies:

    npm install
  4. Start the development environment: You will need two terminal windows.

    Terminal 1 (Sync Convex backend):

    npx convex dev

    Terminal 2 (Run Next.js app):

    npm run dev

    Open http://localhost:3000 to start debating.

๐Ÿ”’ Security & Environment Variables

  • Server-Only Secrets: OPENROUTER_API_KEY and OPENAI_API_KEY must never be exposed to the client. On Vercel, set these as Production Environment Variables.
  • Client Variables: NEXT_PUBLIC_CONVEX_URL is exposed to the browser to connect to your database.
  • Access Gate: You can set NEXT_PUBLIC_ACCESS_PASSWORD to place a simple password gate in front of the UI. (Note: This deters casual UI traffic but does not secure the underlying API routes.)

๐Ÿ“š Documentation & Architecture

For deeper technical details, contributors and operators should review the following internal documentation:

  • AGENTS.md: Architecture notes, state conventions, and learned preferences for AI contributors.
  • docs/runbook.md: Human-facing operational steps, including deployment checklists and API key rotation procedures.
  • docs/second-brain-polymath-x.md: Project vision, timeline, and architectural decisions.

๐Ÿค Contributing

Contributions are welcome! Please ensure you follow the existing code style, run npm run lint and npm run typecheck before submitting, and never commit .env files or hardcoded secrets.

๐Ÿ“„ License

All rights reserved. This is a private project unless an explicit LICENSE file is added.


Repo: github.com/limchinhan123/polymathx

About

๐Ÿง  A multi-model AI debate platform where Claude, GPT-4o, Gemini, and DeepSeek argue complex topics across configurable personas and styles.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages