There are 2 ways to create a mass sim: 1) in the UI OR 2) using the Python SDK
How to Create a Mass Simulation
Option 1. Create in UI
- Go to the “Mass Sims” tab inside your Agent
- Click “Create New Mass Simulation”
- Copy the Mass Sim ID into your SDK:
- You’re done! Now the sessions that you run under this mass simulation ID will be grouped together into one mass simulation. If you want to create another one, just repeat the process and make sure to use the right mass sim ID!
Option 2. Create in Python SDK
This approach to creating a mass simulation doesn’t need any UI interaction at all! It is often more convenient to create a mass simulation using the Python SDK if you want to do things such as create a script that creates multiple mass simulations. You can programmatically create a mass simulation using thecreate_mass_sim()
function:
Returns
- A string containing the unique ID of the created mass simulation.
Example Usage
Create a mass simulation and then use the returned ID in your session initialization:🏃 How to Run your Mass Simulation
A Mass Simulation is just a way to group multiple sessions with the same task together and see the analytics of the sessions as a whole. Therefore, it is still necessary to run the sessions under the mass simulation ID. Feel free to run your sessions however you like! For your convenience, we created two bash scripts to help you run your sessions in a loop.1. Running the sessions in a mass simulation sequentially:
This means it will run your agent script one at a time, waiting for each session to finish before running the next one.n
is the number of sessions you want to run and your-script.py
is the file path from the current directory to the script that runs your agent.
Example Usage:
gemini.py
agent 5 times.
2. Running the sessions in a mass simulation in parallel:
This means it will run your agent script multiple times at the same time (in parallel), so it will run faster.Important Note: If you are running more than 5 sessions in parallel, ensure that your computer can handle it!
Note: The &
at the end of the command runs the process in the background and allows you to run multiple processes at the same time.
Where n
is the number of sessions you want to run and your-script.py
is the file path from the current directory to the script that runs your agent.
Example Usage:
gemini.py
agent 5 times in parallel (i.e. launch 5 processes at the same time).