ChatArena (or Chat Arena) is a Multi-Agent Language Game Environments for LLMs. The goal is to develop communication and collaboration capabilities of AIs.
Multi-Agent Language Game Environments for LLMs
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Aug 11, 2025: This project has been deprecated due to a lack of wide spread community use, and is no longer planned to receive any additional updates or support.**
---
ChatArena is a library that provides multi-agent language game environments and facilitates research about autonomous
LLM agents and their social interactions.
It provides the following features:
- **Abstraction**: it provides a flexible framework to define multiple players, environments and the interactions
between them, based on Markov Decision Process.
- **Language Game Environments**: it provides a set of environments that can help understanding, benchmarking or
training agent LLMs.
- **User-friendly Interfaces**: it provides both Web UI and CLI to develop/prompt engineer your LLM agents to act in
environments.
Getting Started
**Try our online demo:**
Installation
Requirements:
- Python >= 3. 7
- OpenAI API key (optional, for using GPT-3.5-turbo or GPT-4 as an LLM agent)
Install with pip:
or install from source:
To use GPT-3 as an LLM agent, set your OpenAI API key:
Optional Dependencies
By default pip install chatarena will only install dependencies necessary for ChatArena's core functionalities.
You can install optional dependencies with the following commands:
Launch the Demo Locally
The quickest way to see ChatArena in action is via the demo Web UI.
To launch the demo on your local machine, you first pip install chatarena with extra gradio dependency, then git clone
this repository to your local folder, and finally call the app.py in the root directory of the repository:
This will launch a demo server for ChatArena, and you can access it from your browser (port 8080).
[//]: # (The interface looks like this:)
[//]: # ()
Check out this video to learn how to use Web UI:
For Developers
For an introduction to the ChatArena framework, please refer to this document.
For a walkthrough of building a new environment, check
Here we provide a compact guide on minimal setup to run the game and some general advice on customization.
Key Concepts
1. **Arena**: Arena encapsulates an environment and a collection of players. It drives the main loop of the game and
provides HCI utilities like webUI, CLI, configuration loading and data storage.
2. **Environment**: The environment stores the game state and executes game logics to make transitions between game
states. It also renders observations for players, the observations are natural languages.
1. The game state is not directly visible to the players. Players can only see the observations.
3. **Language Backend**: Language backends are the source of language intelligence. It takes text (or collection of
text) as input and returns text in response.
4. **Player**: The player is an agent that plays the game. In RL terminology, it’s a policy, a stateless function
mapping from observations to actions.
Run the Game with Python API
Load Arena from a config file -- here we use examples/nlp-classroom-3players.json in this repository as an example:
Run the game in an interactive CLI interface:
Check out this video to learn how to use
CLI:
A more detailed guide about how to run the main interaction loop with finer-grained control can be
found here
General Customization Advice
1. **Arena**: Overriding Arena basically means one is going to write their own main loop. This can allow different
interaction interfaces or drive games in a more automated manner, for example, running an online RL training loop
2. **Environment**: A new environment corresponds to a new game, one can define the game dynamics here with hard-coded