tool · draft
Mesa
Open-source Python library for building agent-based models, with grids, networks, data collection and a browser view; Mesa-Geo adds maps, so agents can live in real geography loaded from GIS files.
People & societyCities & places
What is reusable: open sourceopen dataAPIopen participation Apache-2.0
Mesa is a toolkit for writing agent-based models in Python. An agent-based model describes individuals, people, animals or firms, and the rules each follows, then runs them together to see what patterns emerge from their interaction. Mesa supplies the common parts: agents and a way to step them, spaces such as grids and networks, tools to record each step, and an interactive view in a web browser or a Jupyter notebook.1,2 The project presents it as the Python alternative to NetLogo, Repast and MASON.2
It is an open-source project that welcomes contributions.1 The paper describing version 3, by Ewout ter Hoeven and six co-authors, appeared in the Journal of Open Source Software in March 2025.1,4 Version 3.5.1 came out in March 2026, version 4 is in pre-release, and the project is very active, with commits in October 2026.5,6 It takes part in Google Summer of Code.1,2
The same project makes Mesa-Geo, which adds a geographic space. Its agents carry a real geometry, a Shapely shape, with a coordinate reference system, and can be loaded from shapefiles, GeoJSON or GeoPandas tables.3 With it, agents can stand on real streets and parcels instead of an abstract grid.
Both install with pip.2,3 Models are plain Python, so they can use Python's data tools for input and analysis.1 Mesa ships with no population or disease of its own; everything specific to a place has to be built by the modeller. For a visual, lower-code start, see NetLogo; for a platform built around GIS from the outset, see GAMA. Mesa and Mesa-Geo are Apache-2.0.2,3
- form
- open-source Python library
- group
- People and populations
- homepage
- https://mesa.readthedocs.io/stable/
- licence
- Apache-2.0
- cost
- free
does a similar job
-
Free, open-source environment for agent-based modelling, created by Uri Wilensky and developed at Northwestern University; widely used in teaching and research, with a desktop version and NetLogo Web in the browser.
open sourceopen dataAPIopen participation
-
Open-source software for building and running agent-based simulations set in geographic space, used for urban mobility, evacuation, epidemics, climate adaptation and planning.
open sourceopen participation
alternative to
-
Free, open-source environment for agent-based modelling, created by Uri Wilensky and developed at Northwestern University; widely used in teaching and research, with a desktop version and NetLogo Web in the browser.
open sourceopen dataAPIopen participation
Tags: agent-based, Python, simulation framework, GIS, teaching