Aller directement au contenu principal

openhands.core.setup

create_runtime

def create_runtime(config: AppConfig,
sid: str | None = None,
headless_mode: bool = True) -> Runtime

Create a runtime for the agent to run on.

config: The app config. sid: (optional) The session id. IMPORTANT: please don't set this unless you know what you're doing. Set it to incompatible value will cause unexpected behavior on RemoteRuntime. headless_mode: Whether the agent is run in headless mode. create_runtime is typically called within evaluation scripts, where we don't want to have the VSCode UI open, so it defaults to True.

generate_sid

def generate_sid(config: AppConfig, session_name: str | None = None) -> str

Generate a session id based on the session name and the jwt secret.