• Customers
  • Pricing
  • Docs
Sign Up

Compute Glossary

How computers for agents work, from the hardware to the sandbox.

  1. Compute Glossary
  2. /
  3. Reinforcement learning

Environment

Also called RL environment, Gym environment

HostSandboxRepositoryTaskToolsTestsSnapshot to reset to

An environment is the world a model acts in during reinforcement learning. It receives each action, changes in response, and reports what the model can now observe. For an agent, the environment might be a code repository with a shell, a web browser, or a desktop. A task inside it sets the goal, such as fixing a failing test or filling in a form.

The common interface has two operations. Reset puts the environment in its starting state and returns the first observation. Step applies one action and returns the next observation, a reward, and whether the task has ended. This shape was popularized by the Gym library for classic control and game tasks, which is why such environments are often called gym environments.

Environments for agents differ from games in what they contain. A coding environment holds a full operating system, the tools a developer would use, and a project with its history. The agent's actions are tool calls, such as running a command or editing a file. The environment carries them out exactly as a computer would, with real side effects inside its boundaries.

Environments as sandboxes

Environments as sandboxes give each attempt its own computer, isolated from the trainer and from other attempts. The model runs code that no one has reviewed, and during training it explores actions that are wrong on purpose or by accident. A sandbox keeps those actions inside a machine that can be thrown away. It also keeps one attempt from changing what another attempt sees.

Each environment starts from an image that holds the operating system, the project and its dependencies. Building that image once and starting many sandboxes from it is far faster than installing everything for each attempt. Tasks that need a network, such as installing packages, can reach only what the environment allows. Most environments block the rest, so results depend less on outside services, though allowed ones can still change or fail.

Isolation also protects the training signal. If the model could read the tests that grade it, or the answer stored beside them, it could learn to use them instead of solving the task. Keeping the verifier and its data outside the reach of the model guards against reward hacking. Strong isolation is therefore part of the design of a good environment, not only a safety measure.

Resetting between rollouts

Resetting between rollouts returns an environment to its starting state, so every attempt begins from the same place. Results are only comparable when nothing carries over from the attempt before. A reset can mean starting a new sandbox from the image, or restoring a saved state of one that is already set up. Training runs thousands of resets, so their speed directly limits how fast training goes.

Starting from the image is simple, but every start repeats the boot and any setup the task needs. A snapshot taken after that setup removes the repeated work. Restoring a memory snapshot brings back a machine with its services already running, often in well under a second. Copy-on-write storage lets many environments share the same starting disk, writing only their own changes.

A reset must not leave traces that a later attempt can find. Files, caches and running processes from one rollout would let the next one pick up hints. Identical copies restored from one snapshot also share the same random state, which matters for tasks that rely on randomness. Discarding the machine after each rollout, and never reusing it, is the safest way to keep attempts independent.

Related terms

  • Rollout
  • Verifier
  • Sandbox
  • Snapshot
  • Isolation
PreviousReinforcement learningNextRollout

On this page

Compute Glossary
  1. Foundations
    • Sandbox
    • Virtual machine
    • vCPU
    • Block storage
    • Virtual network interface
    • Kernel
    • Hardware virtualization
    • Hypervisor
    • GPU
    • CPU core
    • Memory
    • CPU
    • Local disk
    • Network interface card
    • Compute
    • Workload
    • Latency
  2. Sandboxes
    • Isolation
    • Lifecycle
    • Snapshot
    • Persistence
  3. Virtualization
    • KVM
    • MicroVM
    • Container
  4. Hardware
    • Server
    • CPU architecture
    • CPU type
    • GPU memory
    • GPU model
    • Mac model
  5. Kernel
    • System call
    • Process
    • Memory page
    • Namespace
    • Control group
    • Seccomp
  6. Storage
    • Object storage
    • File system
  7. Networking
    • Egress control
    • SSH
  8. Infrastructure
    • Control plane
    • Scheduler
    • Overcommit
    • Preemption
    • Region
    • Capacity
    • Scale
  9. Agents
    • AI agent
    • Tool call
    • Untrusted code
  10. Reinforcement learning
    • Reinforcement learning
    • Environment
    • Rollout
    • Verifier
    • Reward hacking
    • Actor–learner architecture

Computersfor Agents

Isolated sandboxes for agent code,
ready in under 100 ms.

Start for Free

Subscribe to DotFiles Insider, our monthly digest of AI infrastructure news, deep dives, and Daytona product releases.

Company

  • About
  • Careers
  • Brand
  • Partners
  • Startup Program
  • Research Grants
  • Events
  • Contact

Product

  • Pricing
  • Docs
  • Changelog

Resources

  • Guides
  • Blog

Legal

  • DPA
  • SLA
  • Terms of Service
  • Privacy Policy
Trust Center
All Systems Operational