Mesa 3

Mesa 3: Agent-based modeling with Python in 2025 - Published in JOSS (2025)

https://github.com/projectmesa/mesa

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    15 of 167 committers (9.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

agent-based-modeling agent-based-simulation complex-systems complexity-analysis gis mesa modeling-agents simulation simulation-environment simulation-framework spatial-models

Keywords from Contributors

mesh hydrology parallel fem cryptocurrencies finite-elements exoplanet energy-system dependency-distance voice-conversion

Scientific Fields

Sociology Social Sciences - 64% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.

Basic Info
  • Host: GitHub
  • Owner: projectmesa
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://mesa.readthedocs.io
  • Size: 14 MB
Statistics
  • Stars: 3,118
  • Watchers: 97
  • Forks: 1,032
  • Open Issues: 156
  • Releases: 41
Topics
agent-based-modeling agent-based-simulation complex-systems complexity-analysis gis mesa modeling-agents simulation simulation-environment simulation-framework spatial-models
Created over 11 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

Mesa: Agent-based modeling in Python

| | | |---------| --- | | CI/CD | GitHub Actions build status Coverage status | | Package | PyPI - Version PyPI - Downloads PyPI - Python Version | | Meta | linting - Ruff code style: black Hatch project SPEC 0 — Minimum Supported Dependencies | | Chat | chat | | Cite | DOI |

Mesa allows users to quickly create agent-based models using built-in core components (such as spatial grids and agent schedulers) or customized implementations; visualize them using a browser-based interface; and analyze their results using Python's data analysis tools. Its goal is to be the Python-based alternative to NetLogo, Repast, or MASON.

A screenshot of the WolfSheep Model in Mesa

Above: A Mesa implementation of the WolfSheep model, this can be displayed in browser windows or Jupyter.

Features

  • Modular components
  • Browser-based visualization
  • Built-in tools for analysis
  • Example model library

Using Mesa

To install our latest stable release, run:

bash pip install -U mesa

Starting with Mesa 3.0, we don't install all our dependencies anymore by default. ```bash

You can customize the additional dependencies you need, if you want. Available are:

pip install -U "mesa[network,viz]"

This is equivalent to our recommended dependencies:

pip install -U "mesa[rec]"

To install all, including developer, dependencies:

pip install -U "mesa[all]" ```

You can also use pip to install the latest GitHub version:

bash pip install -U -e git+https://github.com/projectmesa/mesa@main#egg=mesa

Or any other (development) branch on this repo or your own fork:

bash pip install -U -e git+https://github.com/YOUR_FORK/mesa@YOUR_BRANCH#egg=mesa

Resources

For resources or help on using Mesa, check out the following:

Running Mesa in Docker

You can run Mesa in a Docker container in a few ways.

If you are a Mesa developer, first install Docker Compose and then, in the folder containing the Mesa Git repository, you run:

``` bash $ docker compose up

If you want to make it run in the background, you instead run

$ docker compose up -d ```

This runs the Schelling model, as an example.

With the docker-compose.yml file in this Git repository, the docker compose up command does two important things:

  • It mounts the mesa root directory (relative to the docker-compose.yml file) into /opt/mesa and runs pip install -e on that directory so your changes to mesa should be reflected in the running container.
  • It binds the docker container's port 8765 to your host system's port 8765 so you can interact with the running model as usual by visiting localhost:8765 on your browser

If you are a model developer that wants to run Mesa on a model, you need to:

  • make sure that your model folder is inside the folder containing the docker-compose.yml file
  • change the MODEL_DIR variable in docker-compose.yml to point to the path of your model
  • make sure that the model folder contains an app.py file

Then, you just need to run docker compose up -d to have it accessible from localhost:8765.

Contributing to Mesa

Want to join the Mesa team or just curious about what is happening with Mesa? You can...

  • Join our Matrix chat room in which questions, issues, and ideas can be (informally) discussed.
  • Come to a monthly dev session (you can find dev session times, agendas and notes on Mesa discussions).
  • Just check out the code on GitHub.

If you run into an issue, please file a ticket for us to discuss. If possible, follow up with a pull request.

If you would like to add a feature, please reach out via ticket or join a dev session (see Mesa discussions). A feature is most likely to be added if you build it!

Don't forget to checkout the Contributors guide.

Citing Mesa

To cite Mesa in your publication, you can refer to our peer-reviewed article in the Journal of Open Source Software (JOSS): - ter Hoeven, E., Kwakkel, J., Hess, V., Pike, T., Wang, B., rht, & Kazil, J. (2025). Mesa 3: Agent-based modeling with Python in 2025. Journal of Open Source Software, 10(107), 7668. https://doi.org/10.21105/joss.07668

Our CITATION.cff can be used to generate APA, BibTeX and other citation formats.

Owner

  • Name: Project Mesa
  • Login: projectmesa
  • Kind: organization

Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.

JOSS Publication

Mesa 3: Agent-based modeling with Python in 2025
Published
March 28, 2025
Volume 10, Issue 107, Page 7668
Authors
Ewout ter Hoeven ORCID
Delft University of Technology (Faculty of Technology, Policy and Management), the Netherlands
Jan Kwakkel ORCID
Delft University of Technology (Faculty of Technology, Policy and Management), the Netherlands
Vincent Hess ORCID
Independent Researcher, Germany
Thomas Pike ORCID
George Mason University (Department of Computational Social Science), United States
Boyu Wang ORCID
University at Buffalo (Department of Geography), United States
Rht ORCID
Independent Researcher
Jackie Kazil ORCID
George Mason University (Department of Computational Social Science), United States
Editor
George K. Thiruvathukal ORCID
Tags
agent-based modeling simulation complex systems social science complexity science modeling

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Hoeven
  given-names: Ewout
  name-particle: ter
  orcid: "https://orcid.org/0009-0002-0805-3425"
- family-names: Kwakkel
  given-names: Jan
  orcid: "https://orcid.org/0000-0001-9447-2954"
- family-names: Hess
  given-names: Vincent
  orcid: "https://orcid.org/0000-0002-9242-8500"
- family-names: Pike
  given-names: Thomas
  orcid: "https://orcid.org/0000-0003-1576-0283"
- family-names: Wang
  given-names: Boyu
  orcid: "https://orcid.org/0000-0001-9879-2138"
- family-names: rht
  orcid: "https://orcid.org/0009-0002-6902-111X"
- family-names: Kazil
  given-names: Jackie
  orcid: "https://orcid.org/0000-0002-8300-7384"
doi: 10.5281/zenodo.15090710
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Hoeven
    given-names: Ewout
    name-particle: ter
    orcid: "https://orcid.org/0009-0002-0805-3425"
  - family-names: Kwakkel
    given-names: Jan
    orcid: "https://orcid.org/0000-0001-9447-2954"
  - family-names: Hess
    given-names: Vincent
    orcid: "https://orcid.org/0000-0002-9242-8500"
  - family-names: Pike
    given-names: Thomas
    orcid: "https://orcid.org/0000-0003-1576-0283"
  - family-names: Wang
    given-names: Boyu
    orcid: "https://orcid.org/0000-0001-9879-2138"
  - family-names: rht
    orcid: "https://orcid.org/0009-0002-6902-111X"
  - family-names: Kazil
    given-names: Jackie
    orcid: "https://orcid.org/0000-0002-8300-7384"
  date-published: 2025-03-28
  doi: 10.21105/joss.07668
  issn: 2475-9066
  issue: 107
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 7668
  title: "Mesa 3: Agent-based modeling with Python in 2025"
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.07668"
  volume: 10
title: "Mesa 3: Agent-based modeling with Python in 2025"

GitHub Events

Total
  • Create event: 51
  • Commit comment event: 1
  • Release event: 15
  • Delete event: 39
  • Member event: 7
  • Pull request event: 521
  • Fork event: 175
  • Issues event: 240
  • Watch event: 641
  • Issue comment event: 2,025
  • Push event: 335
  • Gollum event: 46
  • Pull request review comment event: 608
  • Pull request review event: 875
Last Year
  • Create event: 51
  • Commit comment event: 1
  • Release event: 15
  • Delete event: 39
  • Member event: 7
  • Pull request event: 521
  • Fork event: 175
  • Issues event: 240
  • Watch event: 641
  • Issue comment event: 2,025
  • Push event: 335
  • Gollum event: 46
  • Pull request review comment event: 608
  • Pull request review event: 875

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 2,319
  • Total Committers: 167
  • Avg Commits per committer: 13.886
  • Development Distribution Score (DDS): 0.819
Past Year
  • Commits: 422
  • Committers: 32
  • Avg Commits per committer: 13.188
  • Development Distribution Score (DDS): 0.602
Top Committers
Name Email Commits
rht r****t@p****m 420
jackiekazil j****l@g****m 367
Ewout ter Hoeven E****n@s****l 298
David Masad d****d@g****m 168
Jan Kwakkel j****l@t****l 134
Corvince 1****e 127
tpike3 b****8@g****m 97
Tortar 6****r 58
pre-commit-ci[bot] 6****] 49
Taylor Mutch t****h@g****m 42
cauemello c****o@g****m 24
Dustin J. Mitchell d****n@v****s 23
Jeetu a****p@y****m 22
Sahil Chhoker c****5@g****m 19
ReblochonMasque t****d@g****m 17
Animesh Rawat 1****9 15
Wang Boyu b****y@g****m 13
Jon Schiefelbein l****e@h****m 13
Drewrey Lupton d****y@g****m 13
SebastianoF s****s@g****m 12
Thomas Johnson t****0@h****m 12
dependabot[bot] 4****] 11
Matt Davis j****b@g****m 10
Nathan Miller n****m@g****m 10
rlskoeser r****r@p****u 9
Sascha Holzhauer S****r@u****e 9
Sanika n****p@g****m 9
Stephen Mubita s****a@a****m 8
James Arruda j****a@g****m 8
ihopethiswillfi i****i@y****m 7
and 137 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 337
  • Total pull requests: 1,301
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 25 days
  • Total issue authors: 118
  • Total pull request authors: 97
  • Average comments per issue: 3.77
  • Average comments per pull request: 5.5
  • Merged pull requests: 969
  • Bot issues: 0
  • Bot pull requests: 50
Past Year
  • Issues: 126
  • Pull requests: 663
  • Average time to close issues: 8 days
  • Average time to close pull requests: 6 days
  • Issue authors: 46
  • Pull request authors: 47
  • Average comments per issue: 2.05
  • Average comments per pull request: 4.69
  • Merged pull requests: 492
  • Bot issues: 0
  • Bot pull requests: 21
Top Authors
Issue Authors
  • EwoutH (65)
  • quaquel (38)
  • rht (30)
  • jackiekazil (26)
  • tpike3 (12)
  • Corvince (11)
  • rlskoeser (10)
  • Sahil-Chhoker (7)
  • wang-boyu (5)
  • AlABarazi (4)
  • dmasad (4)
  • SebastianoF (3)
  • mikevlan (2)
  • henrykironde (2)
  • DrEntropy (2)
Pull Request Authors
  • EwoutH (332)
  • rht (210)
  • quaquel (206)
  • Corvince (75)
  • jackiekazil (63)
  • tpike3 (45)
  • Sahil-Chhoker (44)
  • pre-commit-ci[bot] (40)
  • sanika-n (25)
  • wang-boyu (19)
  • aarav-shukla07 (14)
  • colinfrisch (12)
  • dependabot[bot] (9)
  • Holzhauer (8)
  • catherinedevlin (8)
Top Labels
Issue Labels
docs (23) visualisation (18) bug (16) feature (16) Sprints! (14) good first issue (12) 0 - Triage (11) enhancement (8) discuss (8) 1 - Backlog (8) help wanted (8) example (7) Performance (6) easy task!!! (4) front end (4) ci (4) maintenance (4) ignore-for-release (3) experimental (3) breaking (3) 2 - WIP (3) wontfix (1) Feature (1) javascript (1) p1 (1) testing (1) has_pr (1)
Pull Request Labels
docs (165) ignore-for-release (127) enhancement (105) maintenance (86) feature (86) bug (82) visualisation (70) example (63) ci (51) experimental (48) breaking (31) testing (24) backport (19) deprecation (19) easy task!!! (15) trigger-benchmarks (15) backport-candidate (13) dependencies (11) github_actions (9) 3 - Accept (9) Performance (8) 2 - WIP (8) Sprints! (8) discuss (3) help wanted (3) packaging (2) BREAKING Change (2) depedency (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 38,447 last-month
  • Total dependent packages: 9
    (may contain duplicates)
  • Total dependent repositories: 140
    (may contain duplicates)
  • Total versions: 142
  • Total maintainers: 6
pypi.org: mesa

Agent-based modeling (ABM) in Python

  • Versions: 79
  • Dependent Packages: 7
  • Dependent Repositories: 137
  • Downloads: 38,432 Last month
Rankings
Dependent packages count: 1.1%
Dependent repos count: 1.3%
Forks count: 1.5%
Stargazers count: 1.6%
Average: 1.6%
Downloads: 2.5%
Maintainers (5)
Last synced: 4 months ago
proxy.golang.org: github.com/projectmesa/mesa
  • Versions: 53
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 1.0%
Stargazers count: 1.4%
Average: 3.4%
Dependent packages count: 5.4%
Dependent repos count: 5.7%
Last synced: 4 months ago
conda-forge.org: mesa

Mesa is an open-source Python library for agent-based modeling, ideal for simulating complex systems and exploring emergent behaviors.

  • Versions: 8
  • Dependent Packages: 2
  • Dependent Repositories: 3
Rankings
Forks count: 5.9%
Stargazers count: 9.2%
Average: 13.1%
Dependent repos count: 17.9%
Dependent packages count: 19.6%
Last synced: 4 months ago
pypi.org: epsteinsovereigncitizens

A spatial alteration to Epstein's civil violence model

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 15 Last month
Rankings
Dependent packages count: 8.9%
Average: 29.6%
Dependent repos count: 50.2%
Maintainers (1)
Last synced: 4 months ago

Dependencies

Pipfile pypi
  • pytest * develop
  • pytest-cov * develop
  • mesa *
Pipfile.lock pypi
  • attrs ==21.4.0 develop
  • coverage ==6.4 develop
  • iniconfig ==1.1.1 develop
  • packaging ==21.3 develop
  • pluggy ==1.0.0 develop
  • py ==1.11.0 develop
  • pyparsing ==3.0.9 develop
  • pytest ==7.1.2 develop
  • pytest-cov ==3.0.0 develop
  • tomli ==2.0.1 develop
  • arrow ==1.2.2
  • binaryornot ==0.4.4
  • certifi ==2022.5.18.1
  • chardet ==4.0.0
  • charset-normalizer ==2.0.12
  • click ==8.1.3
  • cookiecutter ==2.1.0
  • idna ==3.3
  • jinja2 ==3.1.2
  • jinja2-time ==0.2.0
  • markupsafe ==2.1.1
  • mesa ==0.9.0
  • networkx ==2.8.2
  • numpy ==1.22.4
  • pandas ==1.4.2
  • python-dateutil ==2.8.2
  • python-slugify ==6.1.2
  • pytz ==2022.1
  • pyyaml ==6.0
  • requests ==2.27.1
  • six ==1.16.0
  • text-unidecode ==1.3
  • tornado ==6.1
  • tqdm ==4.64.0
  • urllib3 ==1.26.9
.github/workflows/build_lint.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
.github/workflows/codespell.yml actions
  • actions/checkout v3 composite
  • codespell-project/actions-codespell master composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
Dockerfile docker
  • python 3.10-slim build
docker-compose.yml docker
  • mesa dev