{"schemaVersion":"1.0","record":{"label":"Mesa","description":"Python agent-based modeling framework with data collection and browser visualization.","aliases":[],"kind":"software","website":"https://mesa.readthedocs.io/","overview":"Mesa is an Apache-2.0-licensed Python framework for agent-based modeling. It provides model and agent components, spatial structures, data collection and browser-based visualization while leaving the simulated rules in the author's Python code.","license":"Apache-2.0","lifecycle":"active","example":false,"features":[{"name":"Agent-based authoring","status":"supported","detail":"Python model components and AgentSet support custom agent rules.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://mesa.readthedocs.io/stable/","locator":"Apache2 Python agent framework, Solara and optional dependencies","retrievedAt":"2026-10-07T09:47:58Z","kind":"vendor"}]},{"name":"Analysis outputs","status":"supported","detail":"DataCollector produces pandas-compatible model and agent records.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://mesa.readthedocs.io/stable/apis/datacollection.html","locator":"Model/agent reporters, pandas outputs and serialization caveat","retrievedAt":"2026-10-07T09:48:51Z","kind":"vendor"}]},{"name":"Old-version model compatibility","status":"limited","detail":"Scheduling, initialization and visualization APIs have migration requirements.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://mesa.readthedocs.io/stable/migration_guide.html","locator":"AgentSet, seeding, visualization and scheduling changes","retrievedAt":"2026-10-07T09:48:07Z","kind":"vendor"}]}],"alternatives":[],"slug":"mesa","draftAlternatives":[{"targetSlug":"netlogo","status":"limited","detail":"Substitutes for custom agent-based experiments rebuilt in Python; no native NetLogo project importer is established.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://mesa.readthedocs.io/stable/","locator":"Apache2 Python agent framework, Solara and optional dependencies","retrievedAt":"2026-10-07T09:47:58Z","kind":"vendor"},{"url":"https://mesa.readthedocs.io/stable/migration_guide.html","locator":"AgentSet, seeding, visualization and scheduling changes","retrievedAt":"2026-10-07T09:48:07Z","kind":"vendor"},{"url":"https://docs.netlogo.org/whatis","locator":"Agents, desktop platforms and authoring","retrievedAt":"2026-10-07T09:32:52Z","kind":"vendor"}]}],"evidence":[{"url":"https://mesa.readthedocs.io/stable/","locator":"Apache2 Python agent framework, Solara and optional dependencies","retrievedAt":"2026-10-07T09:47:58Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://mesa.readthedocs.io/stable/","locator":"Apache2 Python agent framework, Solara and optional dependencies","retrievedAt":"2026-10-07T09:47:58Z","id":"me-home","title":"Mesa overview","kind":"vendor"},{"url":"https://mesa.readthedocs.io/stable/migration_guide.html","locator":"AgentSet, seeding, visualization and scheduling changes","retrievedAt":"2026-10-07T09:48:07Z","id":"me-migrate","title":"Mesa migration guide","kind":"vendor"},{"url":"https://mesa.readthedocs.io/stable/apis/datacollection.html","locator":"Model/agent reporters, pandas outputs and serialization caveat","retrievedAt":"2026-10-07T09:48:51Z","id":"me-data","title":"Mesa data collection","kind":"vendor"},{"url":"https://docs.netlogo.org/whatis","locator":"Agents, desktop platforms and authoring","retrievedAt":"2026-10-07T09:32:52Z","id":"nl-about","title":"What is NetLogo?","kind":"vendor"}],"overviewCitations":["me-home"],"licenseCitations":["me-home"],"sections":[{"id":"workflow","heading":"Building agent models","paragraphs":[{"id":"workflow-detail","content":[{"text":"AgentSet manages collections of agents and supports explicit activation patterns. Authors can combine framework components with custom implementations to represent interactions and collect observations. This approach suits teams that want their simulation logic inside a Python project rather than a separate modeling language. A browser visualization is a presentation layer, not evidence that the model requires no Python runtime."}],"citations":["me-home","me-migrate"]}]},{"id":"data","heading":"Collecting useful observations","paragraphs":[{"id":"data-detail","content":[{"text":"DataCollector distinguishes model-wide, individual-agent, agent-type and table data. Reporters select attributes or compute values when collection occurs, and the accumulated records can become pandas data frames. Choosing reporters and collection intervals is part of experimental design: gathering every value does not automatically identify the quantities needed to assess a hypothesis."}],"citations":["me-data"]}]},{"id":"migration","heading":"Version migration","paragraphs":[{"id":"migration-detail","content":[{"text":"The migration guide documents changes to agent initialization, identifiers, scheduling and visualization. Older examples based on scheduler classes should not be assumed to run unchanged with current AgentSet workflows. More recent guidance also makes random seeds explicit for repeated batch experiments. Version and seed choices should accompany reference outputs when a model is shared or upgraded."}],"citations":["me-migrate"]}]},{"id":"deployment","heading":"Deployment and rights","paragraphs":[{"id":"deployment-detail","content":[{"text":"Mesa's core is open source under Apache-2.0. Visualization, plotting and network-modeling workflows can require recommended optional dependencies in addition to the basic package. The data-collection documentation also notes a serialization limitation when reporters use lambda functions. A portable project therefore includes dependency and reporter choices, not just the main model class."}],"citations":["me-home","me-data"]}]},{"id":"substitution","heading":"When it substitutes","paragraphs":[{"id":"substitution-detail","content":[{"text":"Mesa can replace "},{"text":"NetLogo","targetSlug":"netlogo"},{"text":" for custom agent-based simulations when Python integration and programmatic data analysis are priorities. This assessment assumes a rewrite of behavior and experiment controls, not direct loading of NetLogo files. Activation order, random inputs, observations and visual controls must be compared before the rewritten model is treated as equivalent."}],"citations":["me-home","me-migrate","me-data","nl-about"]}]}]},"id":"Q677","revision":725,"updatedAt":"2026-10-13T02:33:33Z","sourceUrl":"https://substitutefor.net/entities/Q677?revision=725"}}