AI-powered debate system using crewAI. Two agents (debater and judge) engage in a structured debate on any given motion, followed by a final decision from the judge.
- Debater Agent: Presents persuasive arguments for or against a given motion
- Judge Agent: Evaluates arguments and decides which side is more compelling
- Sequential Process: Propose → Oppose → Decide workflow
- Spanish Language: Fully localized interface
- Configurable: Easy YAML configuration for agents and tasks
- Multiple Modes: Run, train, test, and replay crew executions
Ensure you have Python >=3.10 <3.14 installed on your system. This project uses UV for dependency management.
# Install UV
pip install uv
# Install dependencies
uv sync- Add your
OPENAI_API_KEYto the.envfile - Configure agents in
src/debate/config/agents.yaml - Configure tasks in
src/debate/config/tasks.yaml
# Run with default motion
crewai run
# Run with custom motion
crewai run --motion "¿Deberían las IA ser reguladas por el gobierno?"The system executes three sequential tasks:
- Propose (
propose.md) - Arguments in favor of the motion - Oppose (
oppose.md) - Arguments against the motion - Decide (
decide.md) - Judge's final decision
Output files are saved to the output/ directory.
# Train the crew (n_iterations, filename)
crewai train 10 results.json
# Test the crew (n_iterations, eval_llm)
crewai test 5 gpt-4
# Replay a specific task
crewai replay task_id
# Run with custom trigger payload
crewai run --trigger '{"motion": "custom topic here"}'debate/
├── src/debate/
│ ├── config/
│ │ ├── agents.yaml # Agent definitions (debater, judge)
│ │ └── tasks.yaml # Task definitions (propose, oppose, decide)
│ ├── crew.py # Crew orchestration class
│ └── main.py # Entry point with run/train/replay/test functions
├── output/ # Generated debate reports
├── .env # Environment variables (API keys)
├── pyproject.toml # Project dependencies
└── README.md # This file
- Role: Convincing debater
- Goal: Present clear arguments for or against the motion
- LLM:
openai/gpt-4o-mini
- Role: Decide the winner based on arguments
- Goal: Evaluate both sides and determine which is more compelling
- LLM:
openai/gpt-4o-mini
┌─────────────────┐
│ Propose │ Debater presents arguments IN FAVOR
└────────┬────────┘
↓
┌─────────────────┐
│ Oppose │ Debater presents arguments AGAINST
└────────┬────────┘
↓
┌─────────────────┐
│ Decide │ Judge evaluates and makes final decision
└─────────────────┘
↓
output/*.md
MIT