Can 1,000,000 AI agents simulate social media?

omni georgio
December 31, 2024
3 mins

TL;DR: Today, I am exploring OASIS, an open-source social media simulator that uses up to a million LLM-based agents to recreate realistic online interactions. Agents can perform actions like commenting, liking, and sharing, with integrated recommendation systems mimicking real-world platforms. I want to tackle three things: explain how it works on a conceptual level, give an overview of its code, and then build on top of it to simulate a League of Legends community.

What is OASIS, and Why Should You Care?

An overview

Think of OASIS as your own personal social media playground. You know how platforms like Reddit and X (formerly Twitter) work, right? Now imagine being able to simulate those environments with AI agents that act surprisingly human-like. They can comment, like posts, share content - pretty much everything we do online.

Key features: 

OASIS stands out because it offers true social media simulation at scale. Here's what makes it unique:

What makes OASIS powerful? Four key features:

  • It can handle a million AI agents simultaneously
  • It adapts to changes in real-time, just like real social networks
  • The agents can perform 21 different actions - from posting to sharing to commenting
  • It uses recommendation systems that mirror real platforms

This combination lets you create realistic simulations of how content and conversations spread across social networks.

Image

Getting Your Hands Dirty: The Technical Stuff

How do we run it?

Now, I know some of you are probably wondering, "Okay, but how does this actually work?" Let me walk you through it:

  1. Setup: Clone the repo, activate a virtual environment, and add your API key
  2. Choose Example: Run simulations like Reddit or X (I started with reddit_simulation_gpt.py)
  3. Configure Settings: Adjust clock factor and time steps to control simulation duration and scale
  4. Handle Data: Load baseline posts for agent interactions and JSON files for agent personas
  5. Check Logs: Monitor actions like post creation and user interactions, visualize results
  6. Customize: Edit data and settings to create your own unique simulations

That's really all there is to the basic setup! The real fun starts when you begin tweaking these elements to create your own scenarios.

My League of Legends Experiment

Here's where things got really interesting. I decided to simulate a League of Legends community because, let's face it, gaming communities have some of the most dynamic interactions online.

  1. I grabbed about 100 posts from the LoL subreddit using Apify's scraper
  2. Created some data files for the simulation (basically telling the AI agents how to behave)
  3. Used an LLM to fine-tune everything so it felt authentic to the LoL community
  4. Let OASIS work its magic and generate the simulation
  5. And finally, built a Reddit-style UI to visualize it all with claude. (see the prompt below)
I am running a simulation of Reddit communities with agents. I need a visualization of the top 5 posts with the most interactions, designed to resemble Reddit's user interface in dark mode. For each post, include the following details:Main Post Content/Title: Display the main content or title in the typical Reddit post style.Upvotes and Downvotes: Show the total number of upvotes and downvotes, similar to Reddit’s format.Comments/Interactions: Include all comments associated with each post, with each comment displayed along with the agent’s username, following Reddit’s comment thread structure.Overall Score: Display the post's overall score (upvotes - downvotes) prominently.Additional Metrics: If applicable, include other metrics such as awards or shares.Agent Usernames: Display the usernames of the agents making the comments, similar to Reddit’s user display.Dark Mode Design: Ensure the entire UI is in dark mode, with the background being dark and text in light colors for easy readability.
Please ensure the layout mirrors Reddit’s design, with the upvote/downvote arrows, comment threads, and agent usernames clearly displayed while keeping the visual consistent with dark mode styling.

Want to Dive Deeper?

I've created a detailed video walkthrough showing how I built a League of Legends community simulation using OASIS. You'll see exactly how to set up the environment, run your first simulation, and analyze the results.

Check out the video: https://www.youtube.com/watch?v=lprGHqkApus

Check out the project: https://www.youtube.com/watch?v=lprGHqkApus

Follow me on X: https://x.com/omni_georgio

Subscribe to my YouTube: https://www.youtube.com/@omni_georgio

a green and white background with a black and white cat

More Related
Articles

omni georgio
December 31, 2024
3 mins