Aller directement au contenu principal

openhands.controller.replay

ReplayManager Objects

class ReplayManager()

ReplayManager manages the lifecycle of a replay session of a given trajectory.

Replay manager keeps track of a list of events, replays actions, and ignore messages and observations.

Note that unexpected or even errorneous results could happen if

  1. any action is non-deterministic, OR
  2. if the initial state before the replay session is different from the initial state of the trajectory.

should_replay

def should_replay() -> bool

Whether the controller is in trajectory replay mode, and the replay hasn't finished. Note: after the replay is finished, the user and the agent could continue to message/act.

This method also moves "replay_index" to the next action, if applicable.