Skip to content

vwzhang/DebateLab

Repository files navigation

Debate Lab

.NET CI

Debate Lab is a Windows WPF desktop app for running, saving, reviewing, and comparing multi-character AI debates. It stores debate topics, run settings, character snapshots, and transcripts so the same topic can be rerun with different players, models, or parameters.

Features

  • WPF desktop UI with Dashboard, Characters, Debate, Review, Settings, and Help tabs.
  • Character templates with editable persona, side, language, temperature, and max token settings.
  • Debate runs that snapshot character settings so old transcripts remain reproducible after template edits.
  • Review tab grouped by debate topic with load, export, and delete support for individual runs.
  • LLM provider selection for OpenAI, Claude, Gemini, Groq, and a local mock client.
  • SQLite and PostgreSQL support through appsettings and environment overrides.
  • xUnit v3 test project covering core services, prompt flow, database configuration, and LLM clients.

WPF Forms

  • Dashboard: Shows high-level counts for characters, debate experiments, runs, completed runs, failed runs, and the latest run status.
  • Characters: Add or edit reusable character templates, including side, output language, persona, speaking style, goals, constraints, temperature, and max token budget.
  • Debate: Create a new debate topic or load an existing one, configure players, choose provider/model settings, set round limits, and generate one round or all remaining rounds.
  • Review: Browse historical debate runs grouped by topic, load transcripts, inspect run-specific character settings, export transcripts, or delete selected runs.
  • Settings: Select the LLM provider and model, review API key presence, and check the active database provider/connection summary.
  • Help: Gives a compact setup guide for API keys, database configuration, debate setup, character behavior, and supported LLM providers.

Search Keywords

AI debate app, WPF LLM app, ChatGPT API desktop app, .NET WPF AI tool, multi-agent debate, AI transcript review, OpenAI WPF sample, Entity Framework Core SQLite PostgreSQL desktop app, xUnit WPF solution.

Screenshots

Screenshots are planned for the next documentation pass:

  • Dashboard overview
  • Debate setup and live transcript
  • Review transcript browser

Requirements

  • Windows
  • .NET 10 SDK
  • Visual Studio 2026 or a compatible .NET IDE
  • Optional: PostgreSQL 16+ if you do not want to use the default SQLite database

Quick Start

dotnet restore
dotnet build DebateLab.slnx
dotnet test DebateLab.Tests\DebateLab.Tests.csproj
dotnet run --project DebateLab.Wpf\DebateLab.Wpf.csproj

The default database provider is SQLite. A local DebateLab.db file is created beside the WPF executable at runtime.

On a fresh database, Debate Lab seeds a few sample debate topics and completed transcripts so the Review tab is useful immediately. Runtime SQLite files are local-only and are not checked into the repository.

API Keys

The app reads provider keys from environment variables and does not store them in source code or the database.

[Environment]::SetEnvironmentVariable("OPENAI_API_KEY", "your_api_key_here", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your_api_key_here", "User")
[Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "your_api_key_here", "User")
[Environment]::SetEnvironmentVariable("GROQ_API_KEY", "your_api_key_here", "User")

Restart the app after changing environment variables.

Database Configuration

Database settings live in DebateLab.Wpf/appsettings.json.

{
  "Database": {
    "DefaultProvider": "Sqlite",
    "ConnectionStrings": {
      "PostgreSql": "",
      "Sqlite": "Data Source=DebateLab.db"
    }
  }
}

Supported environment overrides:

  • DEBATELAB_DATABASE_PROVIDER: Sqlite or PostgreSql
  • DEBATELAB_CONNECTION_STRING: full database connection string
  • DEBATELAB_DB_PASSWORD: PostgreSQL password when using the default local PostgreSQL connection

Publishing

dotnet publish DebateLab.Wpf\DebateLab.Wpf.csproj -c Release -o artifacts\publish

Release builds are published from the WPF project. Downloadable Windows builds are available from the GitHub Releases page.

License

This project is licensed under the MIT License.

About

WPF desktop app for running, saving, reviewing, and comparing AI debate transcripts with configurable characters and LLM providers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages