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?
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:
- Massive Scale: It can handle a million AI agents simultaneously.
- Real-Time Adaptability: Adapts to changes in real-time, just like real social networks.
- Diverse Actions: Agents can perform 21 different actions - from posting to sharing to commenting.
- Realistic Recommendation Systems: Mirrors recommendation algorithms used by real platforms.
This combination enables you to create realistic simulations of how content and conversations spread across social networks.
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:
-
Setup:
- Clone the repo, activate a virtual environment, and add your API key.
-
Choose Example:
- Run simulations like Reddit or X (e.g., start with
reddit_simulation_gpt.py
).
- Run simulations like Reddit or X (e.g., start with
-
Configure Settings:
- Adjust clock factor and time steps to control simulation duration and scale.
-
Handle Data:
- Load baseline posts for agent interactions and JSON files for agent personas.
-
Check Logs:
- Monitor actions like post creation and user interactions, and visualize results.
-
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.
- Grabbed about 100 posts from the LoL subreddit using Apify's scraper.
- Created some data files for the simulation (basically telling the AI agents how to behave).
- Used an LLM to fine-tune everything so it felt authentic to the LoL community.
- Let OASIS work its magic and generate the simulation.
- Built a Reddit-style UI to visualize it all with Claude.
Here’s the prompt I used to create the Reddit-style UI:
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.
- 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
Top comments (0)