# How to vectorize RLlib MultiAgentEnv similar to Gymnasium's VectorEnv?

**URL:** <https://discuss.ray.io/t/how-to-vectorize-rllib-multiagentenv-similar-to-gymnasiums-vectorenv/12971>\
**Category:** RLlib\
**Created:** [November 28, 2023, 9:25pm UTC](https://discuss.ray.io/t/how-to-vectorize-rllib-multiagentenv-similar-to-gymnasiums-vectorenv/12971 "2023-11-28T21:25:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwijesundara](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@cwijesundara](https://discuss.ray.io/u/cwijesundara)\
**Post date:** [November 28, 2023, 9:25pm UTC](https://discuss.ray.io/t/how-to-vectorize-rllib-multiagentenv-similar-to-gymnasiums-vectorenv/12971/1 "2023-11-28T21:25:17Z")

</div>

Hello all! I am attempting to use an RLlib MultiAgentEnv-based environment outside of RLlib for prototyping before I work in RLlib, and I was wondering if it was possible to vectorize environments similar to Gymnasium’s VectorEnv? Although MultiAgentEnv is based on Gym Env, VectorEnv doesn’t support it due to the dictionary-based action space. Does RLlib something have something similar that does support the dictionary action spaces?

The closest thing I could find was this in the GitHub: [https://github.com/ray-project/ray/blob/master/rllib/env/vector\_env.py](https://github.com/ray-project/ray/blob/master/rllib/env/vector_env.py) However I’m not quite sure how to use it as there are no examples.
