A multi-agent debate system based on the AutoGen framework, supporting structured debates on custom topics.
- Custom debate topics
- Multi-agent interaction (Supporter, Opponent, Judge)
- Structured debate process
- Automatic debate recording
- Support for custom LLM and OpenAI API
- Chinese language interface
- Python 3.9+
- OpenAI API key
- (Optional) Custom LLM API configuration
- Clone the repository:
git clone https://github.com/yourusername/AI-Agent-Debate_Autogen_Turtorial.git
cd AI-Agent-Debate_Autogen_Turtorial
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
cp .env.sample .env
Then edit the .env file with your API keys and configuration.
- Start the program:
python main.py
-
Follow the prompts to input:
- Debate topic
- Maximum debate rounds
- System messages for both sides
- Descriptions for both sides
-
Watch the debate:
- The program will automatically conduct the debate
- The judge will moderate and guide the discussion
- A winner will be announced at the end
-
View results:
- Debate records are automatically saved in the debates directory
- Includes both JSON format complete records and readable text records
OPENAI_API_KEY
: OpenAI API keyCUSTOM_LLM_API_KEY
: Custom LLM API keyCUSTOM_LLM_API_BASE
: Custom LLM API base URLCUSTOM_LLM_MODEL
: Custom LLM model name
- Modify system messages in main.py to customize agent behavior
- Adjust maximum debate rounds
- Customize saved information format
.
├── main.py # Main program
├── requirements.txt # Dependencies list
├── .env.sample # Environment variables template
├── .gitignore # Git ignore configuration
├── README.md # Chinese documentation
├── README_en.md # English documentation
└── debates/ # Debate records directory
- Ensure API key security
- Recommended to use virtual environment
- Debate records will use disk space, clean periodically
- Check network connection and key validity if API errors occur
Welcome to submit Issues and Pull Requests to improve the project. Before submitting code, please ensure:
- Code follows Python coding standards
- Necessary comments are added
- Documentation is updated
- Tests pass
MIT License
For questions or suggestions, please submit an Issue or contact the project maintainer.