kaggle-environments
Kaggle Environments
What it is and what it does
Kaggle Environments is a framework for defining and running multi-agent game simulations. It emphasizes episode evaluation—running complete games between agents—rather than agent training. The library provides a simple interface to create environments (like Connect X and Tic Tac Toe), define agent functions that take observations and return actions, and run episodes to completion, collecting step-by-step results and rewards.
Agents can be written as Python functions, loaded from source code or files, or selected from built-in defaults like "random". The framework supports configurable timeouts, debug modes to catch agent errors, and rendering of game replays. It integrates with Open AI Gym for training workflows and includes utilities for running the same agents across multiple episodes to gather statistics.
Use it for:
- Evaluate trained RL agents against each other or built-in baselines in competitive games.
- Run tournament-style competitions between multiple agent implementations.
- Generate episode data for analysis, visualization, or dataset creation.
- Debug agent behavior by running games with verbose logging and error reporting.
- Benchmark different agent strategies across configurable game parameters.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Kaggle Environments provides a framework for creating and running multi-agent game simulations, where agents compete or cooperate in configurable environments like Connect X and Tic Tac Toe.
Yes, if you need to run and evaluate multi-agent game simulations. The package is actively maintained, has low install friction, and provides a clean API for episode evaluation. However, verify the license terms first since they are not clearly stated in the package metadata. The 19 runtime dependencies (including JAX, transformers, and Flask) add complexity; ensure they align with your environment constraints.
Install
kaggle-environments on PyPI
pip
pip install kaggle-environmentsuv
uv add kaggle-environmentspoetry
poetry add kaggle-environmentsInstalling kaggle-environments
Before you install
Low friction: pure Python wheel with no compiled dependencies. Actively maintained with a recent release (7 days ago) and 446 GitHub stars. Requires Python 3.11 or later.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license terms in the repository before use in proprietary or commercial projects.
Quickstart
from kaggle_environments import make
env = make("tictactoe")
def my_agent(obs):
return [c for c in range(len(obs.board)) if obs.board[c] == 0][0]
env.run([my_agent, "random"])
Requires Python 3.11 or later.
Verify before relying
- Whether the unclear license permits commercial or proprietary use without restrictions.
- Performance characteristics when running many episodes or with large environment configurations.
- Stability and compatibility of the 19 runtime dependencies (Flask, JAX, transformers, etc.) across different versions.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 19 — Flask, gymnasium, gymnax, jax, jsonschema, litellm, numpy, open_spiel, pettingzoo, pokerkit, pydantic, pygame, pyjson5, termcolor, requests, shimmy, transformers, tenacity, google-auth |
| Maintenance | actively maintained — 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 141,054/month — #11,254 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kaggle_environments-1.32.6-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
openenv-coreOpenEnv provides a Gymnasium-style framework…
unclear · top 15,000 on PyPI
pettingzooPettingZoo provides multi-agent reinforcement…
permissive · top 15,000 on PyPI
gymnasiumGymnasium provides a standard Python API for…
permissive · top 5,000 on PyPI
gem-llmGEM is a reinforcement learning environment…
permissive · top 15,000 on PyPI
nemo-gymNeMo Gym provides infrastructure for building,…
permissive · top 5,000 on PyPI
TextArenaTextArena provides a framework of 100+…
permissive · top 15,000 on PyPI
kaggleCommand-line interface to interact with…
permissive · top 5,000 on PyPI
ale-pyale-py provides a Python interface to the Atari…
copyleft · top 15,000 on PyPI
gym-alohaProvides a Gymnasium environment for the ALOHA…
permissive · top 15,000 on PyPI