๐ ASS - Argumentative System Service
๐ญ What is ASS?
ASS (Argumentative System Service) is an advanced debate simulation platform that models how expert-level AI personalities argue, reason, and potentially change their minds when presented with compelling evidence. Using internal belief states and sophisticated reasoning systems, ASS helps explore complex topics from multiple perspectives to arrive at more nuanced, well-considered conclusions.
๐ค AI-Generated Project: This entire project was generated by AI from an original idea by Diogo. The concept, architecture, code, and documentation were all created through an AI-assisted development process, demonstrating the potential of human-AI collaboration in software creation.
Perfect for:
- ๐ง Complex Problem-Solving - Model expert debates to find optimal solutions
- ๐ฌ Research & Analysis - Explore topics with rigorous, evidence-based reasoning
- ๐ค Decision Support - Get high-quality arguments from multiple expert perspectives
- ๐ Educational Tools - Demonstrate critical thinking and belief revision
- ๐ฏ Truth-Seeking - Watch AI experts converge on well-reasoned conclusions
๐ญ Meet the Debaters
| Personality | Provider | Traits | Perspective |
|---|---|---|---|
| ๐ Claude Optimist | Claude | Creative, big-picture, opportunity-focused | Sees possibilities everywhere |
| ๐ Claude Skeptic | Claude | Analytical, detail-oriented, risk-aware | Points out flaws and limitations |
| ๐ GPT Visionary | OpenAI | Forward-thinking, innovative, solution-oriented | Champions breakthrough ideas |
| โ๏ธ GPT Critic | OpenAI | Methodical, cautious, problem-focused | Highlights potential issues |
Each personality maintains internal beliefs about truth while presenting arguments, potentially updating their views when faced with compelling evidence. After reaching consensus through voting, an impartial Judge synthesizes all perspectives into a final decision.
๐ง Revolutionary Features
Internal Belief Systems
Each AI personality maintains private beliefs about what's actually true, separate from their public arguments. They can:
- Form expert-level initial assessments based on evidence
- Update beliefs when presented with compelling counter-arguments
- Maintain intellectual honesty while arguing their position
Dynamic Consensus Building
- Personalities debate until reaching agreement through ranked voting
- Arguments must directly engage with others' points
- Real belief revision when evidence warrants it
- Configurable resistance to changing minds
Expert-Level Reasoning
- Deep analysis with citations and evidence
- Field-specific expertise applied to questions
- Rigorous logical argumentation
- Truth-seeking balanced with debate dynamics
๐ฌ Example Debates
๐ค "Should we develop AGI as fast as possible?"
Click to see the debate highlights
Claude Optimist: "The potential benefits are extraordinary! AGI could solve climate change, cure diseases, and unlock technologies we can't even imagine. The faster we develop it responsibly, the sooner we can address humanity's greatest challenges!"
GPT Critic: "This rush toward AGI poses existential risks we don't fully understand. Without proper safety frameworks and international oversight, we could create systems that operate beyond human control or comprehension."
GPT Visionary: "What if we're thinking too small? AGI represents the next evolutionary leap for intelligence itself. With proper safeguards, we could create benevolent systems that enhance human potential rather than replace it."
Claude Skeptic: "The alignment problem remains unsolved. How can we ensure AGI systems will pursue human values when we haven't even agreed on what those values are? The technical challenges of safe AGI are being dangerously underestimated."
Judge's Decision: "A measured approach prioritizing safety research alongside capability development, with mandatory international cooperation frameworks..."
๐ "Is pineapple on pizza acceptable?"
Click to see this heated culinary debate
Claude Optimist: "Pineapple on pizza represents culinary creativity at its finest! The sweet-savory combination creates delightful flavor contrasts, and food should be about joy and experimentation, not rigid rules!"
GPT Critic: "This combination violates fundamental principles of Italian cuisine. The high water content of pineapple creates soggy crusts, while the sweetness overwhelms the carefully balanced acidity of traditional tomato sauce."
GPT Visionary: "Hawaiian pizza opened the door to global fusion cuisine! Without this bold experiment, we might never have discovered other amazing combinations like BBQ chicken or breakfast pizzas."
Claude Skeptic: "Traditional pizza recipes evolved over centuries for good reasons. Adding random fruits doesn't constitute innovationโit's culinary chaos that diminishes the integrity of a perfect food."
Judge's Decision: "While respecting traditional Italian cuisine, food evolution through cultural fusion has created legitimate new traditions. Pineapple pizza, though controversial, represents valid culinary diversity..."
๐ Quick Start
Prerequisites
- Python 3.9+
- UV package manager (install here)
- API Keys:
- OpenAI API key
- Anthropic Claude API key
Installation
-
Clone the repository:
git clone https://github.com/DiogoNeves/ass.git cd ass -
Install dependencies:
uv sync
-
Set up your API keys:
Create a.envfile:CLAUDE_API_KEY=your_claude_api_key_here OPENAI_API_KEY=your_openai_api_key_here
Running Debates
Web Interface - Browser-based with real-time streaming:
uv run python web_server.py
# Then open http://localhost:8000Interactive CLI - Terminal interface with Rich formatting:
uv run python debate_app.pyDemo Mode - See a pre-configured debate:
uv run python demo.py๐ฎ How It Works
๐ณ๏ธ Voting Mode (Default)
graph TD
A[Your Question] --> B[Iteration 0: Initial Positions]
B --> C[Iteration 1+: Direct Argumentation]
C --> D{Voting Phase}
D -->|No Consensus| C
D -->|Consensus Reached| E[Judge Reviews Everything]
E --> F[Final Decision]
style A fill:#e1f5fe
style D fill:#fff3cd
style F fill:#f3e5f5
- ๐ฏ Question Input - You provide any question or topic
- ๐ญ Initial Positions - Each personality presents their stance without arguing
- ๐ฅ Argumentation - Personalities directly engage with each other's points
- ๐ณ๏ธ Voting - After each iteration, personalities rank all participants
- ๐ Consensus Check - Continue until voting threshold is reached
- โ๏ธ Judge Review - Final synthesis with potential override
๐ญ Classic Mode
graph TD
A[Your Question] --> B[Round 1: Opening Arguments]
B --> C[Round 2: Rebuttals & Counter-arguments]
C --> D[Round 3: Final Positions]
D --> E[Judge's Final Decision]
style A fill:#e1f5fe
style E fill:#f3e5f5
Use --classic-mode to run the original 3-round format.
๐ ๏ธ Architecture
The application uses a modular architecture with Pydantic validation and clear separation of concerns:
# Create a new personality with validated configuration
from models.personality import PersonalityConfig
from personalities import create_personality
new_personality = create_personality(PersonalityConfig(
name="My Custom Debater",
model_provider="claude", # or "openai" or "local"
model_name="claude-3-5-sonnet-20241112",
system_prompt="Your personality description...",
reasoning_depth=8,
truth_seeking=7,
voting_traits=PersonalityTraits(fairness=8, self_confidence=6)
))Key Components:
models/- Pydantic models with automatic validation:PersonalityConfig- Validated personality configurationVote,VotingConfig- Voting system modelsDebateConfig,DebateState- Debate managementArgument,ArgumentHistory- Argument tracking
personalities/- AI personality implementations:LLMPersonality- Abstract base classClaudePersonality,OpenAIPersonality,LocalModelPersonality
services/- Business logic:DebateManager- Core debate orchestrationFileManager- Save/load debates with AI titles
ui/- User interface:RichFormatter- Terminal formattingPromptHandler- User input handling
๐ก Interesting Questions to Try
๐ง Philosophy & Ethics
- "Is free will an illusion?"
- "Should we prioritize individual freedom or collective security?"
- "Is artificial consciousness possible?"
๐ Society & Technology
- "Should social media be regulated like tobacco?"
- "Is remote work better for society than office work?"
- "Should we colonize Mars or fix Earth first?"
๐จ Creative & Fun
- "Which is the superior breakfast: cereal or toast?"
- "Should we bring back extinct species through genetic engineering?"
- "Is a hot dog a sandwich?"
๐๏ธ Policy & Governance
- "Should voting be mandatory in democracies?"
- "Is universal basic income feasible?"
- "Should we abolish daylight saving time?"
๐จ Features
- ๐ง Internal Belief States - AI personalities maintain private beliefs about truth
- ๐ Expert-Level Reasoning - Deep analysis with evidence and field-specific knowledge
- ๐ Belief Revision - Personalities can genuinely change their minds with strong evidence
- ๐ณ๏ธ Consensus-Based Voting - Debate until reaching agreement through ranked voting
- ๐ฌ Direct Argumentation - Must engage with others' specific points
- ๐ Configurable Persistence - Control how resistant each personality is to changing beliefs
- ๐ค Multi-Model Support - Claude, OpenAI, and local model servers
- โ๏ธ Truth-Seeking Judge - Maximum reasoning depth and openness to best arguments
- ๐ฏ Sophisticated Traits - Belief persistence, reasoning depth, truth-seeking levels
- โ Pydantic Validation - Runtime validation of all data structures with clear error messages
- ๐ง Highly Configurable - JSON configs, environment variables, CLI flags
- ๐ Belief Tracking - Monitor how positions evolve through debate
- ๐ Web Interface - Browser-based UI with real-time SSE streaming
- ๐ญ Rich CLI Interface - Beautiful formatting with progress indicators
- ๐พ Automatic Debate Saving - Preserves complete debate history with AI-generated titles
- ๐๏ธ Modular Architecture - Clear separation between models, services, UI, and personalities
๐ง Customization
Adding New Personalities
Extend the debate by creating personalities with unique traits (with full validation):
from models.personality import PersonalityConfig, PersonalityTraits
personalities["economist"] = create_personality(PersonalityConfig(
name="Dr. Economy",
model_provider="openai",
model_name="gpt-4o-20250117",
system_prompt="You are a pragmatic economist focused on costs, benefits, and market dynamics...",
reasoning_depth=9,
truth_seeking=8,
belief_persistence=7,
voting_traits=PersonalityTraits(
fairness=8,
self_confidence=7,
strategic_thinking=9,
empathy=6
)
))Supported Models
Anthropic Claude:
claude-sonnet-4-20250514(Latest & Recommended - 2025)claude-3-5-sonnet-20241022claude-3-haiku-20240307- Other Claude models
OpenAI:
gpt-4.1-2025-04-14(Latest & Recommended - 2025)gpt-4gpt-4-turbogpt-3.5-turbo
Local Models:
- Any OpenAI-compatible API endpoint
- Configure with
--local-model-urlorLOCAL_MODEL_URLenvironment variable
Configuration Options
Command Line Arguments
# Voting mode options
uv run python debate_app.py --voting-threshold 0.8 # Set consensus to 80%
uv run python debate_app.py --max-iterations 15 # Allow up to 15 rounds
uv run python debate_app.py --min-iterations 3 # Require 3 rounds before voting
# Classic mode
uv run python debate_app.py --classic-mode # Use original 3-round format
uv run python debate_app.py --no-voting # Disable voting system
# Local model support
uv run python debate_app.py --local-model-url http://localhost:8080
# Configuration file
uv run python debate_app.py --config my_config.json
# Disable automatic saving
uv run python debate_app.py --no-saveEnvironment Variables
# Voting configuration
export DEBATE_VOTING_ENABLED=true
export DEBATE_CONSENSUS_THRESHOLD=0.75
export DEBATE_MAX_ITERATIONS=10
export DEBATE_CLASSIC_MODE=false
# Local model configuration
export LOCAL_MODEL_URL=http://localhost:8080
export LOCAL_MODEL_AUTH=your-auth-token
export LOCAL_MODEL_TIMEOUT=30
# API Keys (existing)
export CLAUDE_API_KEY=your_claude_key
export OPENAI_API_KEY=your_openai_keyConfiguration File
Create a JSON configuration file (see sample_config.json):
{
"voting_enabled": true,
"consensus_threshold": 0.75,
"min_iterations": 2,
"max_iterations": 10,
"scoring_system": {
"1": 4,
"2": 3,
"3": 2,
"4": 1
},
"judge_can_override": true,
"override_threshold": 0.9,
"allow_local_models": true,
"local_model_timeout": 30,
"classic_mode": false
}๐ Project Structure
ass/
โโโ ๐ README.md # This file
โโโ โ๏ธ pyproject.toml # UV project configuration
โโโ ๐ uv.lock # Dependency lock file
โโโ ๐ .env # API keys (create this)
โโโ ๐ญ debate_app.py # CLI interactive application entry point
โโโ ๐ง debate_engine.py # Shared debate logic (generator-based, UI-agnostic)
โโโ ๐ web_server.py # FastAPI web server with SSE streaming
โโโ ๐ static/ # Web frontend assets
โ โโโ index.html # Single-page debate UI
โโโ ๐ models/ # Pydantic data models with validation
โ โโโ __init__.py
โ โโโ personality.py # PersonalityConfig, PersonalityTraits
โ โโโ voting.py # Vote, VotingConfig, VotingResult
โ โโโ debate.py # DebateConfig, DebateState
โ โโโ arguments.py # Argument, ArgumentHistory
โโโ ๐ personalities/ # AI personality implementations
โ โโโ __init__.py
โ โโโ base.py # LLMPersonality abstract base class
โ โโโ claude.py # Claude implementation
โ โโโ openai.py # OpenAI implementation
โ โโโ local.py # Local model implementation
โ โโโ factory.py # create_personality factory
โโโ ๐ services/ # Business logic services
โ โโโ __init__.py
โ โโโ debate_manager.py # Core debate orchestration
โ โโโ file_manager.py # Save/load with AI titles
โโโ ๐ ui/ # User interface components
โ โโโ __init__.py
โ โโโ rich_formatter.py # Rich terminal formatting
โ โโโ prompts.py # User input handling
โโโ ๐ง personality.py # Backward compatibility imports
โโโ ๐ณ๏ธ voting.py # Voting system implementation
โโโ โ๏ธ config.py # Debate configuration
โโโ ๐ฌ demo.py # Demo runner with sample debates
โโโ ๐ sample_config.json # Example configuration file
โโโ ๐ VOTING-FEATURE.md # Voting feature requirements
โโโ ๐ debates/ # Saved debate files (auto-created)
โโโ .gitkeep # Keeps folder in git
๐ค Contributing
We welcome contributions! Here are some ideas:
- ๐ญ New Personality Types - Add specialists (scientist, artist, philosopher)
- ๐ Additional LLM Providers - Support for more AI models (Gemini, Mistral, etc.)
- ๐ช Enhanced Debate Formats - Tournament brackets, team debates, panel discussions
- ๐ณ๏ธ Alternative Voting Systems - Approval voting, Condorcet method, etc.
- ๐จ UI Improvements - Better visualizations, vote graphs, debate trees
- ๐ Analytics - Argument quality metrics, consensus patterns, debate statistics
- โ Web Interface - Already implemented! FastAPI + SSE with dark-themed frontend
- ๐พ Enhanced Debate History - Advanced analysis and replay features
- ๐ Argument Mining - Extract key points and conclusions automatically
Development Setup
# Clone and setup
git clone https://github.com/DiogoNeves/ass.git
cd ass
uv sync
# Install development dependencies
uv sync --dev
# Set up pre-commit hooks (one-time)
uv run pre-commit install
# Code quality checks
uv run pylint *.py # Linting (baseline ~6.6/10)
uv run isort . --check-only # Check import order
uv run autoflake --check -r . # Check for unused imports
# Auto-fix code issues
uv run isort . # Fix import ordering
uv run autoflake --remove-all-unused-imports -r . -i # Remove unused imports
# Run tests (when added)
uv run pytest
# Run a debate without saving
uv run python debate_app.py --no-saveCode Quality Tools
The project uses several tools to maintain code quality:
- pre-commit - Runs automatic checks before each commit
- pylint - Static code analysis (config in
.pylintrc) - isort - Import sorting (config in
.isort.cfg) - autoflake - Removes unused imports and variables
- Pydantic - Runtime validation for all data models
Current pylint score: ~6.6/10 (improving over time)
Pre-commit hooks automatically run:
- Import sorting with isort
- Unused import removal with autoflake
- Trailing whitespace removal
- File ending fixes
- YAML/JSON validation
Note: pylint is not included in pre-commit due to speed, run it separately.
๐พ Automatic Debate Saving
Debates are automatically saved to JSON files in the debates/ directory with:
- AI-Generated Titles - Using Claude Haiku for fast, descriptive naming
- Complete History - All iterations, arguments, votes, and decisions
- Timestamped Files - Format:
YYYYMMDD_HHMMSS_Title_Keywords.json - Incremental Saves - State saved after each iteration for crash recovery
Saved Data Includes:
- Question and generated title
- All personality arguments by iteration
- Voting records and consensus tracking
- Internal belief updates (when DEBUG_BELIEFS=true)
- Judge's final decision
- Configuration used for the debate
Control Saving:
# Disable saving for quick tests
uv run python debate_app.py --no-save
# Or via environment variable
export DEBATE_SAVE_ENABLED=falseExample Saved File:
{
"title": "AI Development Speed Debate",
"question": "Should we develop AGI as fast as possible?",
"timestamp": "20250621_143052",
"iterations": [
{
"iteration": 0,
"arguments": { /* personality arguments */ },
"consensus_reached": false
},
// ... more iterations
],
"final_consensus": true,
"final_judge_decision": "After careful consideration..."
}๐ ๏ธ Troubleshooting
๐ API Key Issues:
- Ensure your
.envfile is in the project root - Verify API keys are valid and have sufficient credits
- Check that keys don't have extra spaces or quotes
๐ฆ Import Errors:
- Run
uv syncto install all dependencies - Ensure you're using Python 3.9+
- Use
uv run python script.pyinstead ofpython script.py
๐ UV Issues:
- Install UV: Installation Guide
- Update UV:
uv self update
๐ License
MIT License - see LICENSE file for details.
๐ Acknowledgments
- Rich - Beautiful terminal formatting
- OpenAI - GPT models and API
- Anthropic - Claude models and API
- UV - Fast Python package manager
๐ญ Ready to watch AIs debate? Start a discussion and see what happens! ๐ญ
โญ Star this repo โข ๐ Report Bug โข ๐ก Request Feature