Spaces:
Sleeping
Sleeping
File size: 4,023 Bytes
896d2a4 129baac 896d2a4 129baac 896d2a4 129baac 896d2a4 129baac |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
---
title: OASIS Demo - Social Media Simulation
emoji: ποΈ
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: apache-2.0
---
# ποΈ OASIS Demo: Open Agent Social Interaction Simulations
This is a simplified demonstration of [OASIS](https://github.com/camel-ai/oasis) - a scalable, open-source social media simulator that incorporates large language model agents to realistically mimic the behavior of up to one million users on platforms like Twitter and Reddit.
## What is OASIS?
OASIS is designed to facilitate the study of complex social phenomena such as:
- Information spread and viral content
- Group polarization and echo chambers
- Herd behavior and social influence
- Content recommendation systems
- Social network dynamics
## Demo Features
This simplified demo showcases:
- **Multi-agent interactions**: Create 2-5 AI agents with different personalities
- **Content generation**: Agents create posts on various topics
- **Social engagement**: Agents like, repost, and interact with content
- **Real-time simulation**: Watch social dynamics unfold step by step
## Key Capabilities of Full OASIS
### π Scalability
- Supports simulations of up to **1 million agents**
- Enables studies at scale comparable to real-world platforms
### π² Dynamic Environments
- Adapts to real-time changes in social networks
- Mirrors fluid dynamics of Twitter and Reddit
### ππΌ Diverse Action Spaces
- Agents can perform **23 different actions**
- Including following, commenting, reposting, searching, etc.
### π₯ Integrated Recommendation Systems
- Interest-based recommendation algorithms
- Hot-score-based content discovery
## Getting Started with Full OASIS
```bash
pip install camel-oasis
```
```python
import asyncio
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
import oasis
from oasis import ActionType, LLMAction, generate_reddit_agent_graph
# Set up your OpenAI API key
# export OPENAI_API_KEY=your_key_here
async def main():
# Create model
model = ModelFactory.create(
model_platform=ModelPlatformType.OPENAI,
model_type=ModelType.GPT_4O_MINI,
)
# Define available actions
available_actions = [
ActionType.LIKE_POST,
ActionType.CREATE_POST,
ActionType.CREATE_COMMENT,
ActionType.FOLLOW,
ActionType.DO_NOTHING,
]
# Generate agent graph
agent_graph = await generate_reddit_agent_graph(
profile_path="./data/reddit/user_data_36.json",
model=model,
available_actions=available_actions,
)
# Create environment
env = oasis.make(
agent_graph=agent_graph,
platform=oasis.DefaultPlatformType.REDDIT,
database_path="./simulation.db",
)
# Run simulation
await env.reset()
actions = {agent: LLMAction() for _, agent in env.agent_graph.get_agents()}
await env.step(actions)
await env.close()
if __name__ == "__main__":
asyncio.run(main())
```
## Research Applications
OASIS enables research in:
- **Information Dynamics**: How news and misinformation spread
- **Social Psychology**: Group behavior and influence patterns
- **Platform Design**: Testing recommendation algorithms and policies
- **Crisis Response**: Understanding information flow during emergencies
- **Political Science**: Studying polarization and opinion formation
## Links
- **Repository**: [github.com/camel-ai/oasis](https://github.com/camel-ai/oasis)
- **Documentation**: [docs.oasis.camel-ai.org](https://docs.oasis.camel-ai.org)
- **Paper**: [Research publication](https://arxiv.org/abs/2411.11581)
- **CAMEL-AI**: [camel-ai.org](https://www.camel-ai.org/)
## License
Apache License 2.0
---
**Note**: This demo shows a simplified version of OASIS capabilities. The full framework supports much more complex simulations with real LLM-powered agents, sophisticated social networks, and detailed behavioral modeling.
|