| title | Thesis Defender |
|---|---|
| emoji | 🛡️ |
| colorFrom | blue |
| colorTo | purple |
| sdk | docker |
| pinned | false |
Paste any argument. Find out exactly where it breaks.
Built for the Microsoft Agents League Hackathon 2026 (Reasoning Agents track)
ThesisDefender is an adversarial argument reasoning agent designed to stress-test your claims. Unlike debate tools or essay helpers, it doesn't just help you write—it dismantles what you already have and tells you exactly where your reasoning breaks, acting as a crucible for your ideas.
It takes any claim, thesis, or argument as plain text input and deploys a sophisticated, multi-step reasoning agent that:
- Steel-Mans: Builds the strongest possible defense of the argument.
- Attacks: Constructs the most devastating counterargument.
- Exposes the Weakest Link: Identifies the single most fragile assumption in the argument chain.
- Strengthens: Generates a fortified, patched version of the original claim.
- Scores: Assigns an Argument Resilience Score (0–100) based on objective analysis.
Efficiency and precision are at the core of ThesisDefender. This project adheres to a strict limit of exactly 3 LLM API calls per analysis:
| Phase | Description |
|---|---|
| Call 1 (Structure) | Extracts the core claim, sub-claims, and implicit assumptions. |
| Retrieval Pass | Not an LLM call. Uses Microsoft Foundry IQ to fetch real-world evidence based on the structure. |
| Call 2 (Dual Reasoning) | Generates both the steel-man defense and strongest attack simultaneously in one pass, utilizing the retrieved evidence. |
| Call 3 (Verdict) | Synthesizes the analysis into a Resilience Score, assessment, and actionable improvements. |
We utilize a modern, highly responsive stack split into a robust asynchronous backend and a sleek frontend.
Powered by Python & FastAPI
fastapi&uvicorn: High-performance async REST API framework.pydanticv2: For strict, robust JSON schema validation and serialization.redis: For async job queuing (with silent in-memory fallback for local dev).openai&google-generativeai: Native SDKs for model inference.azure-search-documents&azure-identity: Microsoft Foundry IQ integration for agentic retrieval.- Model Support: GitHub Models (Default), OpenAI, Gemini, OpenRouter.
Powered by Next.js & React
- Next.js 14 (App Router): React framework for seamless routing and server-side rendering.
- React 18: Component-based UI logic.
- TailwindCSS: Utility-first CSS framework for a premium, responsive dark-mode aesthetic.
- Framer Motion: For fluid animations, dynamic panel transitions, and the interactive resilience meter.
Get ThesisDefender running locally in minutes.
- Navigate to the
backenddirectory:cd backend - Install dependencies:
pip install -r requirements.txt
- Environment Configuration:
Copy
.env.exampleto.envand configure your keys:MODEL_PROVIDER=openrouter OPENROUTER_API_KEY=your_openrouter_api_key # Alternatively: GITHUB_TOKEN, OPENAI_API_KEY, etc.
- Start the Server:
(Optional: Start a Redis instance for durable background jobs)
uvicorn main:app --reload
- Navigate to the
frontenddirectory:cd frontend - Install dependencies:
npm install
- Environment Configuration:
Copy
.env.local.exampleto.env.localto point to your backend API. - Start the Application:
npm run dev
The backend is Dockerized and pre-configured for Hugging Face Spaces.
- Create a new Docker Space on Hugging Face.
- Link your GitHub repository or copy the contents of the
backendfolder. - In your Space's Settings, add the necessary Secrets (e.g.,
MODEL_PROVIDER,OPENROUTER_API_KEY). - The Space will automatically build and deploy on port
7860.
The frontend is built with Next.js and deploys seamlessly on Vercel.
- Go to your Vercel Dashboard and click Add New > Project.
- Import this GitHub repository.
- Set the Framework Preset to
Next.jsand the Root Directory tofrontend. - In the Environment Variables section, add:
NEXT_PUBLIC_API_URL: Set this to your Hugging Face Space URL (e.g.,https://your-username-spacename.hf.space).
- Click Deploy.
Want to see it in action? Check out our 3-minute hackathon pitch script in DEMO_SCRIPT.md.