skillfed

gem-llm

A Gym for Generalist LLMs.

gem-llm v0.1.0 224.5K downloads/30d#9,232 on PyPI506
Permissive license Apache-2.0 AGING released

What it is and what it does

GEM is an open-source environment suite designed for training agentic LLMs via online reinforcement learning. It provides a standardized API modeled after OpenAI Gym, offering a growing collection of diverse environments across games, mathematical reasoning, competitive coding, knowledge-intensive QA, and synthetic reasoning tasks. The package supports tool integration (Python execution, search, MCP), async vectorized execution for high-throughput simulation, and is training framework-agnostic, with demonstrated integration examples for supported RL frameworks.

The core use case is enabling researchers and practitioners to train LLM-based agents through interactive experience rather than static datasets. GEM handles environment management, observation-action-reward loops, and episode termination logic, while remaining agnostic to the choice of training algorithm (REINFORCE, GRPO, PPO, REINFORCE + ReBN) or RL framework. It depends on nltk, math-verify, reasoning-gym, and msgspec for core functionality.

Use it for:

  • Train agentic LLMs on game-solving tasks like Sudoku or number-guessing using GEM's built-in game environments and your choice of RL framework.
  • Develop and benchmark LLM agents on mathematical reasoning problems by using the math environment category and comparing algorithm performance.
  • Build tool-using agents that call Python executors or search APIs within GEM's environment wrapper system for complex multi-step tasks.
  • Integrate GEM environments with existing RL training frameworks to leverage your preferred infrastructure for distributed training.
  • Evaluate LLM agent performance across diverse reasoning tasks from the ReasoningGym category without reimplementing evaluation logic.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

GEM is a reinforcement learning environment suite that provides a standardized API for training agentic LLMs through interactive experience in diverse task domains including games, math, code, QA, and reasoning.

Yes, with conditions. GEM is worth installing if you are actively researching or building agentic LLM training systems and need a standardized, framework-agnostic environment API. The low install friction, permissive Apache-2.0 license, and diverse task collection make it a solid foundation. However, the aging maintenance status (last commit 2026-01-21, no recent releases) and beta stability warrant caution for production use. Verify that the runtime dependencies and supported RL frameworks remain compatible with your workflow before committing to it.

Install

gem-llm on PyPI

pip

pip install gem-llm

uv

uv add gem-llm

poetry

poetry add gem-llm

Installing gem-llm

Before you install

Low installation friction with a pure-Python wheel. The package is in beta (Development Status 4) and aging—last commit was 2026-01-21. The four runtime dependencies (nltk, math-verify, reasoning-gym, msgspec) are lightweight, but the lack of recent updates may signal limited active support.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely provided you include a copy of the license and state significant changes.

Quickstart

pip install gem-llm

import gem

env = gem.make("game:GuessTheNumber-v0")
observation, info = env.reset()
action = env.sample_random_action()
next_observation, reward, terminated, truncated, info = env.step(action)

Requires Python 3.10, 3.11, or 3.12 (capped at 3.12). The package depends on nltk, math-verify, reasoning-gym, and msgspec; ensure these are installed or let pip resolve them.

Verify before relying

  • Whether the aging maintenance status (last commit 2026-01-21, no recent releases) indicates the project is still actively maintained or has entered maintenance-only mode.
  • Compatibility and stability of the four runtime dependencies (nltk, math-verify, reasoning-gym, msgspec) with the current gem-llm version.
  • Whether the supported RL training frameworks (Oat, Tinker, Verl, RL2, ROLL, OpenRLHF) are all actively maintained and compatible with gem-llm 0.1.0.

Package facts

License Apache-2.0 (permissive)
Python support capped below the current Python release (<=3.12,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — nltk, math-verify, reasoning-gym, msgspec
Maintenance aging — 313 days since the last release
Last repo commit
First released
Downloads 224,504/month — #9,232 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gem_llm-0.1.0-py3-none-any.whl

Development Status :: 4 - BetaProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

llm reinforcement learning environmentagentic llm training frameworkgym for language modelsrl environment apillm agent training suiteinteractive llm learninglanguage model gym
reinforcement-learningllm-trainingagent-environments

More Artificial Intelligence packages

Further reading