LibreAI / AI Agents / SWE-Gym
// agents · SWE-Gym/SWE-Gym

SWE-Gym

SWE-Gym: the first training environment for real-world software engineering agents and verifiers (ICML 2025).

★ 748 stars⑂ 46 forksApache-2.0updated 2025-07
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

SWE-Gym is an open-source ai agents project by SWE-Gym (SWE-Gym/SWE-Gym on GitHub). It has 748 GitHub stars and 46 forks, is released under the Apache-2.0 license, and was last updated on GitHub on 29 July 2025.

Repository
SWE-Gym/SWE-Gym
GitHub stars
748
Forks
46
License
Apache-2.0
Last updated on GitHub
29 July 2025
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Clarify your goal

    Decide your goal: training an agent, training a verifier for inference-time scaling, or reproducing the paper's results.

  2. Get the project

    Clone the repository and review the scaffold-specific instructions for OpenHands or MoatlessTools.

  3. Install and configure

    Access the dataset from Hugging Face and pull the pre-built Docker image for the task instances you will train on.

  4. Run your first task

    Generate agent trajectories, fine-tune or rejection-sample your model, and evaluate on SWE-Bench splits using the included verifier approach.

// features

Why people love it

Real tasks with verification

Thousands of real-world tasks drawn from 11 Python repositories, each with repository context, an executable environment, and test-based verification, plus a smaller Lite split.

Agent training trajectories

Documented generation of agent-environment interaction trajectories with OpenHands for fine-tuning models as SWE agents.

Verifier training for inference-time scaling

Verifiers trained on trajectories select the most promising solution among samples, improving results through best-of-n selection.

Two scaffold paths

Reproduction instructions cover both the OpenHands and MoatlessTools agent scaffolds.

Pre-built instance images

Docker images for each task instance are published on Docker Hub, removing environment setup friction.

Published open baselines

The project reports open state-of-the-art results for its time on SWE-Bench Verified and Lite, with scaling analyses in the paper.

Advertisement
// run it

Run it yourself

  1. Clone the repository

    Start from the code and documentation for the training and reproduction workflows.

    git clone https://github.com/SWE-Gym/SWE-Gym.git
    cd SWE-Gym
  2. Get the dataset and environment images

    Download the dataset and models from the project's Hugging Face page and pull instance images from Docker Hub. # see README reproducing results section

    # dataset and models: https://huggingface.co/SWE-Gym (see README)
  3. Follow a scaffold guide

    Reproduce training or inference-time scaling with the documented scaffold instructions.

    # see docs/OpenHands.md and docs/MoatlessTools.md in the repository
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains it?

SWE-Gym was created by researchers from UC Berkeley, UIUC, CMU, and Apple, and is maintained under the SWE-Gym GitHub organisation.

Is it free to use?

Yes, the project is Apache-2.0 licensed and its dataset and models are public on Hugging Face; training itself requires substantial compute that you provide.

Does it need a paid API key?

No API key is required for the environment itself, though the documented trajectory generation used hosted models such as GPT-4o and Claude, which need those providers' access if you follow the same recipe.

How does it compare to a well-known alternative?

SWE-Bench is an evaluation benchmark; SWE-Gym is a training environment with executable tasks and verification designed to improve performance on benchmarks like SWE-Bench.

How do I get started?

Clone the repo, download the dataset from Hugging Face, and follow docs/OpenHands.md or docs/MoatlessTools.md for the workflow you want.

// keep exploring

Similar tools

AI Agents

adk-python

Google's code-first toolkit for building real AI agents.

★ 21.7k starsApache-2.0
View guide →
AI Agents

OSWorld-V2

Benchmark computer-use agents on long, real-world desktop tasks.

★ 353 starsApache-2.0
View guide →
AI Agents

lerobot

Hugging Face's LeRobot: datasets, models and tools to make real-world robotics AI accessible

★ 28.0k starsApache-2.0
View guide →
AI Agents

cumora

Team chat where AI agents are first-class teammates, not bots.

★ 3.9k starsMIT
View guide →
AI Agents

Loop Engineering

Loop Engineering — practical patterns, starters and a CLI for designing the loops that prompt and orchestrate AI coding agents, with a Loop Ready score

★ 11.6k starsMIT
View guide →
AI Agents

adk-java

A code-first Java toolkit for building AI agents.

★ 1.7k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if SWE-Gym is not the right fit.

Get SWE-Gym

Free and open — grab the source, star the repo, and start creating.