Skip to main content

openhands.runtime.runtime

Runtime Objects

class Runtime()

The runtime is how the agent interacts with the external environment. This includes a bash sandbox, a browser, and filesystem interactions.

sid is the session id, which is used to identify the current user session.

run_action

def run_action(action: Action) -> Observation

Run an action and return the resulting observation. If the action is not runnable in any runtime, a NullObservation is returned. If the action is not supported by the current runtime, an ErrorObservation is returned.

list_files

@abstractmethod
def list_files(path: str | None = None) -> list[str]

List files in the sandbox.

If path is None, list files in the sandbox's initial working directory (e.g., /workspace).