LLMGym: A Unified Environment for LLM Agent Development and Benchmarking

This repository profile is provided by osrepos.com, an open source repository discovery platform.

LLMGym: A Unified Environment for LLM Agent Development and Benchmarking

Summary

LLMGym is a unified environment interface designed for developing and benchmarking LLM applications that learn from feedback. It provides a suite of seamlessly swappable environments, making fair and comprehensive comparisons easier for researchers and developers. This project aims to be the "gym" for LLM agents, offering an intuitive interface for various tasks.

Repository Information

Analyzed by OSRepos on May 12, 2026

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

LLMGym is a unified environment interface designed for developing and benchmarking LLM applications that learn from feedback. Drawing inspiration from the popular Gymnasium library, LLMGym aims to be the "gym" for LLM agents. As the landscape of LLM benchmarks rapidly expands, LLMGym provides an intuitive interface for a suite of environments that can be seamlessly swapped out for research and development purposes, facilitating fair and comprehensive comparisons.

Important Note: This repository is still under active development. Expect breaking changes.

LLMGym includes a diverse set of environments:

  • BabyAI: Text-based versions of BabyAI grid world environments for instruction following.
  • Harbor: An adapter for Harbor tasks, allowing you to run any containerized task as an LLMGym environment.
  • Multi-Hop: Multi-hop question answering with iterative search and note-taking.
  • NER: Named Entity Recognition tasks.
  • Tau Bench: Customer service environments for airline and retail domains.
  • Terminal Bench: Docker-based terminal environments for solving programming and system administration tasks.
  • Twenty-One Questions: The classic guessing game where agents ask yes/no questions to identify a secret.

Installation

To get started with LLMGym, follow these installation steps:

Prerequisites

  • Install Python >=3.12, <3.14.
  • Install uv.

Setup LLMGym

git clone git@github.com:tensorzero/llmgym.git
cd llmgym
uv venv
source .venv/bin/activate
uv sync

Verify the Installation

python -c "import llmgym; print(llmgym.__version__)"

Setting Environment Variables

To set the OPENAI_API_KEY environment variable, run the following command:

export OPENAI_API_KEY="your_openai_api_key"

It is recommended to use direnv and create a local .envrc file to manage environment variables. For example, your .envrc file might look like this:

export OPENAI_API_KEY="your_openai_api_key"

Then, run direnv allow to load the environment variables.

Examples

Here's a quickstart example demonstrating how to use LLMGym:

import llmgym
from llmgym.logs import get_logger
from llmgym.agents import OpenAIAgent

env  = llmgym.make("21_questions_v0")

agent = llmgym.agents.OpenAIAgent(
    model_name="gpt-4o-mini",
    function_configs=env.functions,
    tool_configs=env.tools,
)
# Get default horizon
max_steps = env.horizon

# Reset the environment
reset_data = await env.reset()
obs = reset_data.observation

# Run the episode
for _step in range(max_steps):
    # Get action from agent
    action = await agent.act(obs)

    # Step the environment
    step_data = await env.step(action)
    obs = step_data.observation

    # Check if the episode is done
    done = step_data.terminated or step_data.truncated
    if done:
        break
await env.close()

You can find more examples and tutorials in the project's notebooks:

Why Use LLMGym?

LLMGym offers a powerful and flexible solution for anyone working with LLM agents that learn from feedback. Its key advantages include:

  • Unified Interface: Provides a consistent API for interacting with various LLM environments, simplifying development.
  • Benchmarking: Designed to make fair and comprehensive comparisons across different LLM applications and agents easier.
  • Diverse Environments: Comes with a rich set of pre-built environments, covering tasks from instruction following to programming and customer service.
  • Accelerated Development: Streamlines the process of building, testing, and iterating on LLM agents.
  • Research Ready: Offers a robust platform for academic and industrial research into LLM agent behavior and learning.

Links

Related repositories

Similar repositories that may be relevant next.

awesome-cli-coding-agents: A Curated Directory of Terminal-Native AI Tools

awesome-cli-coding-agents: A Curated Directory of Terminal-Native AI Tools

August 9, 2026

The `awesome-cli-coding-agents` repository offers a comprehensive, curated directory of over 100 terminal-native AI coding agents. These powerful tools operate directly within your command line, enabling autonomous code reading, editing, and execution. The list also covers various harnesses and orchestration solutions for managing these agents.

AICLICoding Agents
QwenPaw: Your Personal AI Assistant for Local and Cloud Deployment

QwenPaw: Your Personal AI Assistant for Local and Cloud Deployment

August 7, 2026

QwenPaw is a powerful personal AI assistant designed for easy installation and deployment, either on your local machine or in the cloud. It supports multiple chat applications and offers highly extensible capabilities, making it a versatile tool for various AI-driven tasks. With its robust memory system and security features, QwenPaw aims to be an intuitive and private partner in your digital life.

agentai-agentchatbot
DeepTutor: Lifelong Personalized Tutoring with AI Agents

DeepTutor: Lifelong Personalized Tutoring with AI Agents

August 7, 2026

DeepTutor is an advanced AI-powered platform designed for lifelong personalized tutoring, integrating various learning modes into a single, extensible system. It leverages large language models and multi-agent systems to offer features like interactive chat, quiz generation, and skill development. This project provides a comprehensive environment for learners and educators seeking intelligent, adaptive educational tools.

AITutoringLLM
Memori: Agent-Native Memory Infrastructure for LLM Production Systems

Memori: Agent-Native Memory Infrastructure for LLM Production Systems

August 6, 2026

Memori provides agent-native memory infrastructure, offering an LLM-agnostic layer that transforms agent execution and conversations into structured, persistent state. Designed for enterprise use, it seamlessly integrates with existing data infrastructure and supports various deployment environments, ensuring robust memory management for AI agents.

agent-memoryLLMAI

Source repository

Open the original repository on GitHub.

15 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️