pettingzoo
Gymnasium for multi-agent reinforcement learning.
Decision gist · record as of 2026-08-14
Yes. PettingZoo is actively maintained, has low install friction, carries a permissive MIT license, and is the standard library for multi-agent RL research. It has no known vulnerabilities, supports current Python versions (3.10–3.14), and integrates cleanly with popular RL training frameworks. Install it if you need a multi-agent environment interface; use base install for API exploration and add extras only for specific environment families.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Optional environment families (Atari, Butterfly, etc.) require additional dependencies installable via extras like 'pettingzoo[atari]' or 'pettingzoo[all]'; base install provides core API only.
- Low install friction with a pure-wheel distribution and minimal core dependencies (numpy, gymnasium, typing-extensions).
- Active maintenance with a release 1 day old and 3489 repository stars.
License · maintenance · safety
MIT License (permissive) — MIT License (permissive) allows commercial and private use with minimal restrictions, making it suitable for research, commercial deployment, and derivative work.
last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 3,489 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 311,622 downloads/mo, #7,729 on PyPI
Alternatives
Verify before relying
pip install pettingzoo
from pettingzoo import make
env = make("aec", "butterfly/pistonball-v6")
env.reset()
for agent in env.agent_iter():
observation, reward, termination, truncation, info = env.last()
action = None if termination or truncation else env.action_space(agent).sample()
env.step(action)- Whether specific environment families (Atari, Butterfly, Classic, SISL) are included in the base install or require extras.
- Performance characteristics and scalability limits for large numbers of agents.
- Compatibility with specific RL training frameworks beyond the mentioned examples (CleanRL, Tianshou, AgileRL).
What it is and what it does
PettingZoo is a multi-agent reinforcement learning library that extends Gymnasium's single-agent paradigm to support environments where multiple agents interact simultaneously or sequentially. It models environments as Agent Environment Cycle (AEC) games to provide a unified API for diverse multi-agent scenarios—from competitive Atari games to cooperative puzzle tasks—while maintaining strict environment versioning for reproducibility.
The library offers two interaction modes: a sequential AEC API where agents take turns, and a parallel API for simultaneous action environments. It depends on numpy for numerical operations, gymnasium for the base environment interface, and typing-extensions for type hints. The core install is lightweight, with optional extras for specific environment families that may have system-level dependencies.
Use it for
- Train cooperative multi-agent policies in environments like Pistonball where agents must coordinate to solve tasks.
- Benchmark competitive multi-agent algorithms on classic games (Tic-Tac-Toe, Connect Four) and Atari titles.
- Implement curriculum learning and self-play training using PettingZoo's environment versioning for reproducible experiments.
- Research agent communication and emergent behavior in mixed-sum games combining cooperation and competition.
- Prototype custom multi-agent environments using PettingZoo's API and environment creation tutorials.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PettingZoo is actively maintained, has low install friction, carries a permissive MIT license, and is the standard library for multi-agent RL research. It has no known vulnerabilities, supports current Python versions (3.10–3.14), and integrates cleanly with popular RL training frameworks. Install it if you need a multi-agent environment interface; use base install for API exploration and add extras only for specific environment families.
Install
pettingzoo on PyPI
Before you install
Low install friction with a pure-wheel distribution and minimal core dependencies (numpy, gymnasium, typing-extensions). Active maintenance with a release 1 day old and 3489 repository stars. Supports Python 3.10 through 3.14. Optional extras for specific environment families (atari, all) available for selective installation.
Optional environment families (Atari, Butterfly, etc.) require additional dependencies installable via extras like 'pettingzoo[atari]' or 'pettingzoo[all]'; base install provides core API only.
License in practice
MIT License (permissive) allows commercial and private use with minimal restrictions, making it suitable for research, commercial deployment, and derivative work.
Quickstart
pip install pettingzoo
from pettingzoo import make
env = make("aec", "butterfly/pistonball-v6")
env.reset()
for agent in env.agent_iter():
observation, reward, termination, truncation, info = env.last()
action = None if termination or truncation else env.action_space(agent).sample()
env.step(action)
Verify before relying
- Whether specific environment families (Atari, Butterfly, Classic, SISL) are included in the base install or require extras.
- Performance characteristics and scalability limits for large numbers of agents.
- Compatibility with specific RL training frameworks beyond the mentioned examples (CleanRL, Tianshou, AgileRL).
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpygymnasiumtyping-extensions |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 311,622 / month, #7,729 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence |
Evidence: pettingzoo-1.27.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “multi-agent reinforcement learning”
- pettingzooPettingZoo provides multi-agent reinforcement learning environments…
- open-spielOpenSpiel provides game environments and reinforcement learning…
- tianshouTianshou is a PyTorch-based reinforcement learning library that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also gymnasium · open-spiel · Shimmy · kaggle-environments · ale-py · skrl · tianshou · openenv-core · TextArena · nemo-gym