This method downloads a visual replay of the agent’s actions, which can be useful for debugging or understanding the agent’s behavior.
replay = agent.replay()
replay.save(f"{agent.agent_id}_replay.webp")

Returns

WebpReplay: The replay data in WEBP format.

Raises

  • ValueError: If the agent hasn’t been run yet (no agent_id available).