ChatArena

Multi-Agent Systems 💻 Python ⚖️ Apache-2.0 🔴 No recent commits
1.6k stars

ChatArena is a Python library that provides multi-agent language game environments for large language models, enabling research on autonomous LLM agents and their social interactions. It offers a flexible framework for defining players, environments, and interactions based on Markov Decision Process, along with built-in environments and user-friendly interfaces. It is intended for developers and researchers working with LLMs who want to simulate, benchmark, or train agents in language-based games.

ChatArena demo
🖼️ Screenshot from the project README

✨ Key features

  • Flexible framework for defining multi-agent language games
  • Includes several built-in environments like conversation, chameleon, and chess
  • Supports multiple language backends (OpenAI, Anthropic, Cohere, HuggingFace)
  • Provides both Web UI and CLI for interaction
  • Configurable via JSON files for easy setup
  • Extensible for custom environments and backends

🎯 Use cases

  • Simulating social interactions among LLM agents
  • Benchmarking LLM capabilities in language games
  • Training or fine-tuning LLM agents via reinforcement learning
  • Developing and testing prompt engineering strategies
  • Creating custom multi-agent environments for research

📦 Installation

🧰 Requirements: Python >= 3.7, optional OpenAI API key for GPT-3.5-turbo or GPT-4.

pip install chatarena

or install from source:

pip install git+https://github.com/chatarena/chatarena

To use GPT-3 as an LLM agent, set your OpenAI API key:

export OPENAI_API_KEY="your_api_key_here"

Optional dependencies:

pip install chatarena[all_backends] # install dependencies for all supported backends: anthropic, cohere, huggingface, etc.
pip install chatarena[all_envs]     # install dependencies for all environments, such as pettingzoo
pip install chatarena[all]          # install all optional dependencies for full functionality

🚀 Usage

from chatarena import Arena

arena = Arena.from_config("examples/nlp-classroom-3players.json")
arena.run(num_steps=10)

To run in interactive CLI mode:

arena.launch_cli()

⚠️ Good to know

This project has been deprecated as of Aug 11, 2025, due to lack of widespread community use, and is no longer planned to receive any additional updates or support.

❓ FAQ

What are the requirements to install ChatArena?

You need Python >= 3.7. An OpenAI API key is optional, only required if you want to use GPT-3.5-turbo or GPT-4 as an LLM agent.

How can I run a game with ChatArena?

You can load an Arena from a config file and run it with arena.run(num_steps=10), or launch an interactive CLI with arena.launch_cli().

Can I create my own custom environment?

Yes, you can extend the Environment class and follow the steps in the tutorial, then add it to ALL_ENVIRONMENTS.

Is ChatArena still maintained?

No, the project was deprecated on Aug 11, 2025, and is no longer planned to receive updates or support.

📊 Repository

Stars★ 1,560
Forks🍴 150
Open issues🐛 7
Last commit🕒 Aug 11, 2025
Created📅 Mar 2023
Language💻 Python
License⚖️ Apache-2.0

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.