rlmesh.RemoteEnv

classfrom rlmesh import RemoteEnv[source]

Dependency-free client for one remote environment endpoint.

RemoteEnv(
    address: str | None = None,
    *,
    host: str | None = None,
    port: int | None = None,
    path: str | None = None,
    transport: Transport | None = None,
    connect_timeout_seconds: float | None = None,
    request_timeout_seconds: float | None = None,
    workflow_edition: str | None = None,
) -> None

Observations and actions stay RLMesh-native values; see rlmesh.numpy.RemoteEnv for NumPy leaves.

observation_space

property[source]
property observation_space: Space[ValueT]

Observation space loaded from the remote environment contract.

action_space

property[source]
property action_space: Space[ActionT]

Action space loaded from the remote environment contract.

reset

function[source]
reset(
    *,
    seed: int | None = None,
    options: dict[str, object] | None = None,
) -> tuple[ValueT, ResetInfo]

Reset the remote environment and decode the observation.

Parameters

NameTypeDescription
seedint | NoneOptional environment reset seed.
optionsdict[str, object] | NoneOptional reset options forwarded to the environment.

Returns

TypeDescription
tuple[ValueT, ResetInfo]A decoded observation and reset info dictionary.

step

function[source]
step(action: ActionT) -> tuple[ValueT, float, bool, bool, StepInfo]

Step the remote environment with one encoded action.

Parameters

NameTypeDescription
actionActionTAction accepted by the remote environment action space.

Returns

TypeDescription
tuple[ValueT, float, bool, bool, StepInfo]Observation, reward, terminated flag, truncated flag, and step info.

address

property[source]
property address: str

Endpoint address this client is connected to.

env_id

property[source]
property env_id: str

This connection’s container id (UUIDv7).

A stable correlation identity, distinct from the human env name (env_contract.id).

selected_workflow_edition

property[source]
property selected_workflow_edition: str

The workflow edition this connection negotiated with the env.

The highest edition both sides can drive, at or below whatever either declared, in the exact spelling they agreed on – so a prerelease build reports its cohort, not the bare sealed base. Named apart from the workflow_edition declaration surfaces on purpose: this is what was agreed, not what this side asked for.

env_contract

property[source]
property env_contract: EnvContract

Environment contract returned by the endpoint handshake.

render_mode

property[source]
property render_mode: str | None

Configured render mode reported by the endpoint.

metadata

property[source]
property metadata: Metadata

Endpoint metadata reported by the environment contract.

observation_space_spec

property[source]
property observation_space_spec: SpaceSpec

Native observation space spec reported by the endpoint.

action_space_spec

property[source]
property action_space_spec: SpaceSpec

Native action space spec reported by the endpoint.

render

function[source]
render(*, env_index: int = 0) -> ValueT | None

Render a frame from the remote environment.

Parameters

NameTypeDescription
env_indexintEnvironment index to render. Single environments use 0.

Returns

TypeDescription
ValueT | NoneA decoded render frame, or None when the environment has no frame.

close

function[source]
close() -> None

Detach this client from the remote endpoint.

shutdown

function[source]
shutdown(reason: str = 'owner shutdown') -> bool

Request owner-level shutdown of the remote environment endpoint.