Generative Agent simulation of a Mastodon social network. Paper: http://arxiv.org/abs/2410.13915.
-
Clone the repository:
git clone https://github.com/social-sandbox/mastodon-sim.git cd mastodon-sim
-
Install Poetry (for managing dependencies):
curl -sSL https://install.python-poetry.org | python3 -
Note that poetry offers several alternative installation methods.
-
Configure Poetry to create virtual environments within the project directory:
poetry config virtualenvs.in-project true
-
Install the dependencies:
poetry install
The application relies on a .env
file to manage sensitive information and configuration settings. This file should be placed in the root directory of your project and contain key-value pairs for required environment variables. The dotenv
library is used to load these variables into the environment.
Below is an example of what your .env
file might look like. Make sure to replace the placeholder values with your actual configuration. Note that sensitive values like client IDs, secrets, and passwords are masked for security.
# Mastodon API base URL
API_BASE_URL=https://<domain_name>
# Mastodon client credentials
MASTODON_CLIENT_ID=*************************0
MASTODON_CLIENT_SECRET=*********************************o
# Email prefix for user accounts
EMAIL_PREFIX=<email_prefix>
# Bot user passwords
USER001_PASSWORD=***************************5
USER002_PASSWORD=***************************8
- See
mastodon-sim/infrastructure/mastodon-on-aws/README.md
for Mastodon server deployment instructions. - See
mastodon-sim/notebooks
to run experiments after deploying the server.