Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debate-Me

“पिक्चर अभी बाकी है मेरे दोस्त.”

Think you can win an argument against an AI?

Debate-Me is not a chatbot. It’s a decision-making debate agent that plans how to win.

It doesn’t just respond—it:

  • chooses a strategy
  • explores multiple arguments
  • predicts your response
  • and picks the move most likely to hold

Sometimes it’s logical. Sometimes it’s persuasive. Sometimes it just asks uncomfortable questions.

Either way—it’s trying to win.

You bring opinions. It brings a strategy.

What This Actually Is

Most AI systems generate a response.

Debate-Me generates options, simulates outcomes, and then decides.

This is an agent loop, not a prompt-response system.

Each turn is a mini decision pipeline.

Core Loop

Every response follows this exact flow:

  1. Select or maintain strategy
  2. Generate exactly 3 argument options
  3. Simulate possible user responses
  4. Score each argument path
  5. Select the strongest response
  6. Review if the agent is losing
  7. Switch strategy only after 2 losing turns

This constraint is intentional:

  • prevents randomness
  • enforces consistency
  • mimics human debate behavior

How It Thinks

The agent does not trust its first answer.

It builds a small Tree-of-Thoughts:

  • Option A: logical breakdown
  • Option B: real-world example
  • Option C: counter-question

Then:

“If I say this… what will the user say next?”

Each path is simulated, scored, and stress-tested.

Only the most resilient argument survives.

Strategy Layer

The agent doesn’t just pick what to say It picks how to win

Strategies include:

  • logical dominance
  • evidence-based reasoning
  • Socratic questioning
  • pragmatic framing

It sticks to a strategy while it’s working.

It only switches when:

  • it detects it’s losing
  • and loses twice in a row

That’s deliberate. Humans don’t panic-switch every turn—this shouldn’t either.

Personalities

Same brain. Different opponent.

Choose how the agent behaves:

  • 🧠 Logician — structured, precise
  • 📊 Researcher — evidence-driven
  • ❓ Socratic — probes assumptions
  • ⚖️ Pragmatist — outcome-focused
  • 😏 Challenger — applies pressure

This is not just tone—it affects:

  • argument generation
  • scoring bias
  • strategy preference

Example

Topic: Remote work is better than office work

You:

Remote work kills collaboration.

Agent:

What specific type of collaboration are you referring to?

(Strategy: Socratic — probing assumptions)

Next turn:

Distributed teams often outperform colocated ones when communication is structured. What’s missing in your current setup?

(Strategy persists, pressure increases)

Architecture

User Input
↓
Personality Layer
↓
Strategy Planner
↓
Tree-of-Thoughts Generator (3 options)
↓
Opponent Simulator
↓
Critic / Scoring Engine
↓
Best Argument Selection
↓
Response
↓
Strategy Review (switch if losing twice)

Project Structure

debate_me/
├── engine/                # Core debate pipeline
│   ├── llm.py
│   ├── planner.py
│   ├── tot.py
│   ├── simulator.py
│   ├── critic.py
│   ├── personality.py
│   └── agent.py
│
├── ui/                    # Streamlit UI
│   └── app.py
│
├── cli.py                 # CLI interface
├── main.py                # CLI entrypoint
├── ui.py                  # Streamlit entrypoint
└── requirements.txt

Tech Stack

  • Python
  • LangGraph (agent orchestration)
  • Streamlit (UI)
  • LM Studio (local LLM runtime)
  • Model: gemma-4-e4b (OpenAI-compatible endpoint)

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Start LM Studio server:

  • Endpoint: http://localhost:1234/v1/chat/completions
  • Model: gemma-4-e4b
  • Ensure model is loaded before running

Optional env vars:

  • LM_STUDIO_URL
  • LM_STUDIO_MODEL
  • LM_STUDIO_TIMEOUT

Run

CLI

python3 main.py

Streamlit UI

python3 -m streamlit run ui.py

Debug Visibility

Every turn exposes internal reasoning signals:

  • [PERSONALITY]
  • [STRATEGY]
  • [OPTIONS]
  • [SIMULATION]
  • [SCORES]
  • [DECISION]
  • [SWITCH]

This is not just for debugging—it’s for understanding agent behavior.

What Makes This Interesting

  • Tree-of-Thoughts (multi-path reasoning)
  • Strategy persistence (non-random behavior)
  • Opponent simulation (predictive reasoning)
  • Controlled strategy switching (stateful intelligence)

This is closer to a game-playing agent than a chatbot.

Reality Check

This agent is not always right.

But it is:

  • consistent
  • strategic
  • harder to defeat than it should be

Future Ideas

  • Debate scoring (who is winning)
  • Visual argument tree UI
  • Multi-turn memory graphs
  • Multiplayer debates
  • Audience voting system

Final Note

This isn’t about winning arguments.

It’s about building agents that:

  • explore multiple possibilities
  • evaluate outcomes
  • adapt strategy

Winning is just a side effect.

(Usually.)

About

A debate agent that plans, adapts, and absolutely won’t let you have the last word

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages