> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-css-tab-borders.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Integrate W&B with Farama Gymnasium to track reinforcement learning experiments and record episode videos.

# Farama Gymnasium

If you're using [Farama Gymnasium](https://gymnasium.farama.org/#), W\&B automatically logs videos of your environment generated by `gymnasium.wrappers.Monitor`. To enable video logging, set the `monitor_gym` keyword argument to [`wandb.init()`](/models/ref/python/functions/init) to `True`.

The Gymnasium integration is lightweight. W\&B [reads the name of the video file](https://github.com/wandb/wandb/blob/c5fe3d56b155655980611d32ef09df35cd336872/wandb/integration/gym/__init__.py#LL69C67-L69C67) logged from `gymnasium` and uses that name. If no match is found, the integration falls back to `"videos"`. For more control, you can manually [log a video](/models/track/log/media/).

For more information about using Gymnasium with the CleanRL library, see the [Mario Bros, but with AI: Gymnasium and CleanRL](https://wandb.ai/raph-test/cleanrltest/reports/Mario-Bros-but-with-AI-Gymnasium-and-CleanRL---Vmlldzo0NTcxNTcw) report.

<Frame>
  <img src="https://mintcdn.com/wb-21fd5541-css-tab-borders/Zp1Au-vBGBD27x6o/images/integrations/gymnasium.png?fit=max&auto=format&n=Zp1Au-vBGBD27x6o&q=85&s=f66e16f49c7f216bc7d74e3927b25dd6" alt="Gymnasium RL environment" width="2132" height="1124" data-path="images/integrations/gymnasium.png" />
</Frame>
