What Is an RL Environment for AI Agents?

What an RL environment for AI agents is, what goes inside one, and why the brief, the expert solution and the hidden verifier matter more than the container.

Nomos Insights
8 min read

Short answer

An RL environment is a task an AI model can practise on and be scored by code. It packages a brief, a working environment such as a container, an expert solution that scores 100% and a hidden verifier that turns the state the agent leaves behind into a reward. The container is the packaging. The value is in the brief, the solution, the verifier and the difficulty check.

People hear "RL environment" and picture something large and abstract, a simulated world or a game engine. For coding and STEM agents it is usually much more concrete than that. It is a folder.

An RL environment is a task an AI model can practise on and be scored by code. It holds a brief, a place for the agent to work, an expert solution and a hidden verifier. The agent reads the brief, works inside the environment, and stops. The verifier then looks at what the agent left behind and turns it into a reward. Training repeats that loop many times, and the model drifts toward whatever earned the reward.

That loop sounds simple, and it is. The hard part is making every piece of it trustworthy, because a model will learn from the reward exactly as it is, flaws included. This post walks through what goes inside an environment, using the way we build ours as the example.

What does an RL environment actually contain?

We build every environment as a verifiable task in Harbor format, an open task format for agent evaluation and training. One task is one folder, and a lab can run it against any agent with one command and get a reward back. Inside the folder there are five parts.

| Part | File | What it does | | --- | --- | --- | | Brief | instruction.md | States the goal and the constraints an expert would be given, and nothing that gives away the method | | Environment | environment/ | Pinned images, offline package mirrors where needed and local stand-ins for cloud services | | Reference solution | solution/ | A complete expert solution that must score 100% on every version of the task | | Verifier | tests/ | Grades the final state of the system and writes a machine-readable report beside the reward | | Metadata | task.toml | Category, difficulty, timeouts, resource limits and a version tag |

You can see the same folder laid out on our RL environments page.

Notice what is not on the list. There is no score for how the agent got there, no grader reading its explanation and no partial credit for sounding confident. The verifier judges the end state, the same way a senior engineer would judge a handover by checking whether the thing works.

Why is the container the least interesting part?

Because anyone can write a Dockerfile. A container gives the agent a shell, some tools and a file system. It does not make a task worth training on.

What makes a task worth training on is the four parts around it. A brief that reads the way real work is handed over. A reference solution that proves the task can be done. A verifier that rewards the right end state and nothing else. And a difficulty check that shows the task sits in the range where a model can still learn. Most of our effort goes into those four, and they are where most environments go wrong.

What makes a good brief?

A good brief describes the outcome and the limits, then stops. It reads like a message from a colleague who knows the job and trusts you to do it.

The common mistake is to over-explain. If the brief says which file to edit, which library to use or which law governs the data, the agent no longer has to work any of that out. The task turns into following instructions, and the model learns to follow instructions. We cover this from the science side in leaving the law open.

The opposite mistake is to under-specify. If two reasonable readings of the brief lead to two different end states, and the verifier accepts only one, then some of the agent's failures are not failures at all. That is noise in the reward. Specification files the agent must follow, such as an API contract or a data format, ship inside the environment, so the agent can read them the way an engineer would.

Why does the reference solution have to score 100%?

Because it is the proof that the task is solvable as written. If an expert, working from the same brief and the same environment, cannot reach full marks, the task has a flaw, and every agent that fails it is being graded against that flaw.

We re-run the reference solution on every version of the task. Images get rebuilt, packages get pinned, a check gets tightened. Any of those changes can quietly break a task. If the reference ever scores below 100%, the task does not ship until we find out why.

What does the verifier check, and what does it ignore?

The verifier checks the state of the system once the agent stops. A repaired build or service. A migrated database. A trained or recovered model. A passing hardware simulation. A qualified numerical solver. A complete proof or census. Whatever the brief asked for, the verifier looks at the result.

It runs as a separate user, and for complex tasks in a separate container, so the agent cannot read the tests or edit them. On harder tasks most of the score comes from the verifier driving the system itself, sending real traffic, reading state back and re-running deploys, instead of trusting files the agent wrote about its own work.

A verifier is only as good as the wrong answers it has been tested against. Before a task ships we try to beat our own verifier with shortcut solutions, partial solutions and plausible mistakes, and every one of them has to fail. We explain that process in how to make sure an AI grader is fair and how to write test cases that catch wrong solutions.

How hard should an RL environment be?

Hard but learnable. A task no model ever solves gives a reward of zero on every attempt, and a reward of zero teaches nothing. A task every model solves teaches nothing new either.

So every task has a pass bar tested on today's strongest models, and the bar differs by family.

| Task family | Pass bar on frontier models | | --- | --- | | Terminal and systems | Solved in 1 to 2 of 5 independent attempts | | Codebase investigation | Best of 5 trials scores below 70% | | Code review | At most 2 of 8 review runs pass | | Algorithms and data structures | Solved in at least 1 and at most 3 of 8 attempts | | Cloud and DevOps incidents | At most 1 of 6 panel runs passes |

Meeting the bar is not enough on its own. Every failure has to be genuine, which means it traces back to the problem and not to a broken file or a vague brief. We read the failed runs to confirm that. The reasoning behind the bars is in hard but learnable.

What should a lab receive with each environment?

The folder is the start. A lab that is going to train on a task also needs to know why it can trust it. With every task we deliver:

  • The Harbor task folder, version-tagged, in a private repository.
  • Difficulty results, with the models tested, the attempts, the pass rate and why each failure was real.
  • Verifier audit records, listing the wrong and alternative solutions the verifier was tested against.
  • The task proposal, covering what makes the task hard, the expert approach and the time an expert needs.
  • Expert sign-off, given after two independent expert reviews.

If an environment arrives without that evidence, the reward might still be right. You just have no way to know.

Can the same environment be used for evaluation?

Yes. The package is the same. A brief, a container, an expert solution and a hidden verifier work just as well for measuring a model as for training one. The difference is in how the task is used. An evaluation task is held out from training and never published, so its score measures skill and not memory. We go into that in how to keep an evaluation set out of training data.

Quick answers

What is an RL environment? A task an AI model can practise on and be scored by code, with a brief, a working environment, an expert solution and a hidden verifier that turns the end state into a reward.

What is a verifiable task? A task whose result can be checked by code. It has an expert solution that scores 100% and a hidden verifier that grades the state the agent leaves behind.

What is Harbor format? An open format for agent tasks where each task is one folder with a brief, an environment, a reference solution, tests and metadata, so it can be run against any agent with one command.

Why does an RL task need a pass bar? A task no model solves gives zero reward and teaches nothing, and a task every model solves teaches nothing new. A pass bar keeps the task in the range where training still has something to learn.


Need RL environments you can train on?

We build verifiable tasks in Harbor format, each with an expert solution, a hidden verifier we try to beat ourselves and a pass bar tested on frontier models.

Filed underRL EnvironmentsVerifiable TasksHarborAI Agents