Repo2RLEnv
Open-source Python tool that turns repositories, pull requests and other sources into verifiable Harbor-format RL environments for coding agents.
At a Glance
About Repo2RLEnv
Repo2RLEnv is an open-source project from Hugging Face that generates coding, terminal and reasoning tasks in the Harbor format. Each generated task includes an instruction, a starting environment, a private verifier and a reference solution, so agents can be trained and evaluated against programmatic rewards. The latest release listed is v0.9.5, published 2026-11-04.
What It Is
Repo2RLEnv is a task-generation toolkit for reinforcement learning on coding agents. It builds environments from material that already exists: merged pull requests, commit history, security advisories, a library's own functions, terminal recordings and problem families. The project lists 23 generators (pipelines) covering repository repair, implementation and reconstruction, patch similarity, terminal tasks, and reasoning and optimization problems. Tasks are published to the Hugging Face Hub and can be run with any Harbor agent harness.
How the Workflow Runs
A user points a pipeline at a repository, a merged PR or a task seed with the repo2rlenv generate command. Tasks are then checked statically and with controls: the oracle solution should score 1 and a no-op should score 0. Tasks that fail can go through a review and repair loop. Finally, repo2rlenv push publishes tasks to the Hub, and repo2rlenv pull retrieves published datasets.
Each task is a directory with instruction.md, task.toml, an environment folder with a Dockerfile, a tests folder holding the private verifier, and a solution folder with the reference solution. Scoring varies by pipeline: repository tests, hidden or differential tests, diff similarity with a correctness judge, container state checks, or exact or continuous scores.
Tasksmith
Tasksmith is an experimental agentic pipeline that takes a merged pull request and investigates the change, bootstraps the repository environment on a remote worker, designs the instruction and private verifier, constructs the Harbor task, and reviews and repairs it until controls pass. It orchestrates Pi or OpenCode agents with LangGraph and runs on Daytona or Modal. Its reference cohort, HF_ML_Tasksmith, contains 50 verified tasks.
Setup Path
Install with pip; extras add Harbor, Tasksmith, Daytona or Modal support. The first quickstart pipeline needs Python 3.12+ and the GitHub CLI, with no Docker or LLM key for generation. Running tasks needs Docker, and PR-diff grading needs a correctness judge API key. Tasksmith and the research recipes need a Modal or Daytona account and run their controller on Linux, macOS or WSL.
Community Discussions
Be the first to start a conversation about Repo2RLEnv
Share your experience with Repo2RLEnv, ask questions, or help others learn from your insights.
Pricing
Open Source
Apache-2.0 licensed Repo2RLEnv core, installable via pip and self-hosted. Bundled research-recipe adaptations keep their MIT and Apache-2.0 licenses (distribution is Apache-2.0 AND MIT).
- Apache-2.0 licensed core code
- 23 pipelines/generators for coding, terminal and reasoning tasks
- Outputs standard Harbor-format tasks
- Install via pip install repo2rlenv
- Generated tasks and source repositories keep their own terms
Capabilities
Key Features
- 23 task generators (pipelines)
- Outputs standard Harbor tasks with instruction, environment, private verifier and reference solution
- Tasksmith agent that turns merged pull requests into verified environments
- Oracle and no-op controls with review and repair loop
- Repository repair, implementation, patch similarity, terminal and reasoning/optimization task types
- Publish and pull datasets on the Hugging Face Hub
- CLI for generate, validate, push and pull
- Runs with any Harbor agent harness
