Skip to main content
The web UI is a Starlette application started with dissent serve. It provides a browser-based interface for running debates, browsing transcripts, and managing configuration.

Starting the Server

dissent serve                          # localhost:8080, opens browser
dissent serve --port 9000              # custom port
dissent serve --host 0.0.0.0 --no-open  # all interfaces, no browser launch

Pages

Debate view (/) — chat-style interface for running debates. Type a query, configure the panel and rounds, and watch responses stream in via WebSocket. Each agent’s response appears as a chat bubble with the agent identity label. Synthesis renders as a distinct bubble after all rounds complete. Dashboard (/dashboard) — browse saved transcripts from ~/.mutual-dissent/transcripts/. View debate details and export transcripts as JSON or markdown. Settings (/settings) — view and edit provider API keys, model aliases, routing configuration, and debate defaults. Changes are written to ~/.mutual-dissent/config.toml.

Technology Stack

  • Backend: Starlette with Jinja2 templates and uvicorn
  • Frontend: DaisyUI + Tailwind CSS (CDN), vanilla JavaScript
  • Streaming: WebSocket for real-time debate events
  • Markdown rendering: marked.js + DOMPurify (CDN)
  • No build step — all frontend dependencies loaded via CDN

WebSocket Protocol

The debate page communicates via WebSocket at /ws/debate. Events:
DirectionTypeDescription
Client → Serverdebate_startInitiates a debate with query, panel, synthesizer, rounds
Server → Clientdebate_statusRound progress updates
Server → Clientdebate_responseIndividual agent response with agent identity
Server → Clientdebate_synthesisFinal synthesized answer
Server → Clientdebate_doneDebate complete with transcript ID
Server → Clientdebate_errorError during debate execution

Architecture

The web application entry point is mutual_dissent.web.app. Routes are defined in web/routes.py, WebSocket handling in web/websocket.py, templates in web/templates/, and static assets in web/static/. The dark theme uses DaisyUI’s OKLCH color system with custom overrides in app.css.