Design guide
RL environments for agents.
A reinforcement learning environment specifies observations, actions, state transitions, rewards, reset and episode endings. For computer-use and phone agents, a useful environment also needs a clear task contract, reliable final-state checks and repeatable starting conditions.
What is an RL environment?
A reinforcement learning environment defines the setting in which an agent observes a situation, takes an action and receives a new observation and reward. It also defines how an episode begins and ends. A software interface becomes useful for learning only when these interactions have a consistent, inspectable meaning.
Gymnasium provides a widely used interface for this loop, with reset and step operations. An environment can expose pixels, structured state or another observation format. The choice determines what information the agent can use and should be part of the experiment specification.
Training environments, benchmarks and trajectory data
A training environment supplies interactions and feedback that an optimization process can use to change a policy. A benchmark measures a specified agent on a defined set of tasks. A trajectory dataset records earlier attempts. These resources can share infrastructure, but they serve different purposes: a collection of screenshots is not, by itself, an interactive RL environment.
For frontier-model post-training, specify how rollouts are collected and how feedback reaches the learner. Human demonstrations can support supervised fine-tuning; preference judgments can support other training objectives; an RL loop uses feedback from interaction. Availability of one resource does not imply that every training method is supported. Keep held-out evaluation tasks outside the optimization loop.
Write the task contract
For computer-use and phone-use tasks, begin with the intended outcome. Specify the initial applications and records, the available controls, the time or action budget, and the check that determines success. Record the software and environment versions with the task.
A task such as “update this contact” needs more than a screenshot. It needs an identified record, the requested change, a way to inspect the final state and rules for handling unrelated fields. An environment that grades only a success message cannot establish that the record was changed correctly.
Keep the agent’s observations separate from the evaluator’s privileged view. An evaluator may inspect a database or final artifact even when the agent can only interact through the screen. The test should document that distinction and prevent the evaluator’s answer from leaking into the observation.
A concrete example: changing a meeting
Imagine a hypothetical calendar environment where an agent must move one meeting while preserving its attendees and description. The starting state contains several similar meetings. The agent can inspect the interface and use its normal controls. A final-state evaluator checks the target meeting, the new time and the fields that should remain unchanged.
Reward design deserves separate attention. A reward for opening the correct dialog may help provide feedback, but it is not evidence of a completed task. A reward for the final valid state is easier to interpret. If intermediate rewards are added, test whether an agent can repeatedly collect them without finishing.
Retain the sequence of observations, actions, state changes and grading results. When the task fails, this record can distinguish a mistaken click from a delayed UI update, an incorrect target choice or a faulty evaluator. These distinctions make the next experiment more informative.
Treat reset and episode endings precisely
A reset should restore the conditions the experiment claims to hold fixed. For a software task, those may include records, files, account state and queued background work. Seeded randomness helps control generated variation, but does not by itself make a live external service deterministic.
Gymnasium distinguishes termination from truncation. A terminal state belongs to the defined task; an external limit can interrupt an episode before such a state is reached. That distinction matters to learning algorithms and to reports about why a run ended. A deadline intrinsic to a finite-horizon task can instead define termination; remaining time should be observable when needed to preserve a Markov formulation.
Evaluate what the reward may miss
Keep a held-out set of tasks and variations that are not used to tune the environment or policy. Check final outcomes independently of the reward implementation where practical. Report unsuccessful and interrupted runs alongside successful ones, with the denominator and budget clearly stated.
For multiple agents, also specify action order, private observations and how rewards are assigned. PettingZoo offers reference interfaces for multi-agent reinforcement learning. A shared reward can evaluate a group objective while separate traces help explain each participant’s contribution.
Start with a small suite whose expected outcomes can be inspected manually. Expand after the reset, grader and error handling agree with that inspection. More tasks help only when their results retain a clear meaning.
Discuss the environment you need
Coasty’s platform connects environments, data and evaluation for computer use, phone use and multi-agent systems. Bring the workflows, observation format and success criteria you want to study. The computer-use environment guide details the interface and reset choices, while the evaluation guide explains how to interpret the resulting evidence. This guide is a design reference rather than a specification of a released Coasty training API.