Framework
Environments
The main object you use when running Gym Anything from Python.
The main object in Gym Anything is GymAnythingEnv.
This is what you use when you want to:
- start an environment
- take actions
- get screenshots and other observations
- finish the run cleanly
The Main Methods
Most code uses these methods:
reset()step(...)capture_observation()close()
Typical Flow
from gym_anything import from_config
env = from_config(
"benchmarks/cua_world/environments/moodle_env",
task_id="enroll_student",
)
obs = env.reset(seed=42)
obs, reward, done, info = env.step([])
env.close()What step(...) Does
step(...) sends actions to the environment and returns:
- the new observation
- the reward
- whether the run is done
- extra information in
info
If you want to finish a task and run its checker, call:
obs, reward, done, info = env.step([], mark_done=True)When To Use capture_observation()
Use capture_observation() when you want the current screenshot or other observation data without taking another action. This is useful for inspection, debugging, or custom loops.