Skip to content

Generative Agent simulation of a Mastodon social network

License

Notifications You must be signed in to change notification settings

social-sandbox/mastodon-sim

Repository files navigation

CI Open in Dev Containers

Mastodon Social Simulation

Generative Agent simulation of a Mastodon social network. Paper: http://arxiv.org/abs/2410.13915.

Development Installation

  1. Clone the repository:

    git clone https://github.com/social-sandbox/mastodon-sim.git
    cd mastodon-sim
  2. Install Poetry (for managing dependencies):

    curl -sSL https://install.python-poetry.org | python3 -

    Note that poetry offers several alternative installation methods.

  3. Configure Poetry to create virtual environments within the project directory:

    poetry config virtualenvs.in-project true
  4. Install the dependencies:

    poetry install

Environment Variables

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.

Example .env File

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

Running Experiments

  • 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.

About

Generative Agent simulation of a Mastodon social network

Resources

License

Stars

Watchers

Forks

Packages

No packages published