nguyenthanhasia commited on
Commit
129baac
Β·
verified Β·
1 Parent(s): e38a699

Upload README.md with huggingface_hub

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