Skip to main content

Overview

You can upload files to any environment via the Files tab in the web UI, or using the orwd CLI: Uploading files in the Files tab
These files are stored at /orwd_data/ on the environment server. Your environment server code always has full access to everything in /orwd_data/. Sandboxes, on the other hand, only see what you explicitly mount. This separation is critical: it lets your server hold ground truth data (answers, test cases, rubrics) that the agent in the sandbox never sees.

Two Purposes for Your Files

Your uploaded files serve two distinct roles:

Server-Side Data

The environment server always has access to everything in /orwd_data/. This is where you store data that only your server should see — ground truth answers, expected outputs, rubrics, and evaluation data.
The agent never has access to these files — they exist only on the server.

Local vs Production Paths

/orwd_data/ only exists when your environment is deployed to OpenReward. When developing locally, your files live alongside your code. Use a simple check to handle both cases:
This way you can test locally with the same data files in your project directory, and everything switches to /orwd_data/ automatically when deployed.

Sandbox Data

To give the agent access to files, you mount a directory from /orwd_data/ into the sandbox using SandboxBucketConfig. The key parameter is only_dir, which restricts the mount to a specific subdirectory.
With this configuration, the sandbox at /workspace will contain only the files from /orwd_data/agent/ — nothing else.

Organising Your Files

If you mount the entire bucket without using only_dir, the agent can see all of your files — including ground truth answers, test cases, and rubrics. Try to avoid this!
Structure your uploaded files with separate directories for server data and agent data:
Then mount only the agent/ directory:
Use only_dir to mount a specific subdirectory rather than the entire bucket. This ensures a clear boundary between what the server knows and what the agent sees.

Full Example

Here is a complete environment that keeps ground truth on the server and mounts only input data to the sandbox: File structure in /orwd_data/:
Environment code:

Common Mistake: Mounting Everything

Do not do this if your bucket contains ground truth data.
With this configuration the agent can read your answers, rubrics, and test cases directly. Always use only_dir to restrict access to a specific subdirectory.

Next Steps

Cloud Storage

Full reference for SandboxBucketConfig parameters

Building Agentic Environments

End-to-end tutorial for building an environment with sandboxes