Agents.jl: an agent-based modeling framework in pure Julia
Agent-based modeling framework in Julia
At a glance
- What is it?
- Agents.jl gives Julia users a general-purpose toolkit for agent-based simulation, from discrete-time stepping to event-queue scheduling and Reinforcement Learning integration. It is small to learn, but the ecosystem around it is Julia, and that is the real constraint.
- Who is it for?
- Adopt Agents.jl if your model lives in Julia and you want a short path from an agent type and a step function to a running simulation, including Open Street Maps spaces or Reinforcement Learning integration. Skip it if your team is committed to Python or if you need a visual model builder rather than code.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 72 days ago.
- What is it written in?
- Mainly Julia, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What Agents.jl is for, and who ends up using it
Agent-based modeling means simulating autonomous agents that react to their environment and to each other under a predefined set of rules. The README describes Agents.jl as a pure Julia general-purpose framework for exactly that. The audience is narrower than the phrase suggests: researchers and engineers who already write Julia, or who are willing to, and who want the simulation loop, the spatial structures and the scheduling handled by a library instead of by hand.
The repository topics point at the intended range: cellular automata, complex systems, heterogeneous agent models, individual-based modelling. The examples directory backs that up with predator_prey.jl, sir.jl, flock.jl, zombies.jl and schoolyard.jl. This is a scientific computing tool, not a business-process simulator, and the citation block asks academic users to reference the SIMULATION journal paper when publishing.
If you do not know Julia, the learning cost is real. The README claims a very short learning curve and minimal code, and that claim is about the framework, not about the language it sits in.
The mechanism: agents, spaces, and a step function you write
The architecture visible in the repository is a small set of composable pieces. You define an agent type, you choose a space for agents to live in, and you supply the model-level and agent-level functions that mutate state. The framework owns the iteration, the neighbor lookups and the data collection.
Two scheduling models are supported. The README states that Agents.jl allows both traditional discrete-time ABM simulations and continuous time event queue based simulations. The examples list includes event_rock_paper_scissors.jl, which is the event-queue path, and sir.jl and predator_prey.jl, which are the discrete-time path. Choosing between them is a modeling decision, not a performance knob: an event queue advances time to the next scheduled event, while discrete stepping advances every agent on a fixed tick.
Spaces are pluggable. The examples include celllistmap.jl and delaunay.jl, which indicates that spatial structures beyond a plain grid are available through the same interface. Open Street Maps support is called out in the README as a first-class capability, which matters for anyone modeling movement through a real city.
The Reinforcement Learning integration is native, and the repository ships rl_boltzmann.jl and rl_wolfsheep.jl as worked examples. That is unusual for an ABM framework and is probably the strongest single reason to pick this one over a general-purpose simulator.
Getting the package and the documentation
Agents.jl is a registered Julia package, so installation goes through the Julia package manager. The README does not print an installation snippet of its own; it points to the online documentation and notes that the docs can be built locally by running the docs/make.jl file. That file is the only install-adjacent command the repository material actually names.
To build the documentation from a checkout, run the file the README names:
julia docs/make.jlJulia executes the build script and writes the documentation locally, which is useful when you want docs matching a specific checkout rather than the stable release. For adding the package itself, follow the Julia package manager workflow in the online documentation at https://juliadynamics.github.io/Agents.jl/stable/ rather than guessing at a command.
Once the package is available in your environment, the examples directory is the fastest way to a working model. predator_prey.jl is the smallest complete model in the list, and reading it end to end shows the shape of an agent definition, a space, and the stepping functions. event_rock_paper_scissors.jl is the counterpart for the event-queue style, and rl_boltzmann.jl shows how the Reinforcement Learning integration is wired.
Where Agents.jl is the wrong tool
The framework is pure Julia. That is stated plainly in the README and it is the constraint that decides most adoption questions. If your team writes Python, or your collaborators will only run notebooks in a Python environment, Agents.jl is not a drop-in option. There is no Python binding documented in the repository.
Scale is the second boundary. The framework is fast, and the README points to a comparison repository for that claim, but agent-based models that need distributed execution across a cluster are a different problem. Nothing in the top-level repository layout or the README describes a distributed backend, so treat single-machine simulation as the documented mode.
Version churn is the third issue. The release history shows v7.0.1, v7.0.2 and v7.0.3 within a few months, and a major version number of 7 means the API has moved before. A model written against an older major version may need edits. CHANGELOG.md at the repository root is the file to read before upgrading, and the README does not make any compatibility promise across majors.
Finally, if you want to build a model by dragging boxes in a graphical editor, this is not that. Agents.jl is a code library. The examples/agents_visualizations.jl file shows that visualization exists, but it is a plotting concern layered on top of a simulation you write yourself.
Agents.jl compared with Mesa and other ABM frameworks
The most common comparison for this project is Mesa, the Python agent-based modeling framework. The difference in approach is not cosmetic. Mesa lives in the Python ecosystem, so it inherits Python's data science stack, its notebooks and its deployment story, and it pays for that with interpreter overhead on tight simulation loops. Agents.jl takes the opposite trade: a smaller ecosystem, a language many teams do not already use, and a runtime that the README claims is typically faster than established competitors.
The README links to a comparison repository rather than quoting a number, so the honest position is that the performance difference is asserted and benchmarked externally, not proven inside this repository. If throughput is your deciding factor, run the comparison on your own model rather than trusting either side's framing.
The second difference is scope. Mesa is a general ABM library. Agents.jl adds two things Mesa's documentation does not advertise in the same way: event-queue scheduling as a first-class alternative to discrete ticks, and native Reinforcement Learning integration. If your model needs an RL agent learning inside the simulation, that integration is the reason to choose this framework, and the rl_boltzmann.jl and rl_wolfsheep.jl examples are where you see how it is wired.
Maintenance, licensing and the cost of upgrading
The repository is not archived, and the last push was on 2026-07-05. The most recent release listed is v7.0.3 from 2026-06-23, following v7.0.2 in May and v7.0.1 in March. That cadence means patch releases arrive often, and a project pinned to an older patch should expect to move.
The upgrade cost is concentrated at major versions. Patch releases within v7 are unlikely to require model changes, but the jump from v6 to v7 already happened, and CHANGELOG.md is the record of what moved. The practical habit is to pin the version in your environment's Project.toml and read the changelog before bumping.
The licence is MIT, per the LICENSE.md file at the repository root. MIT is permissive: it allows commercial and closed-source use, and it requires that the copyright notice and permission notice be preserved in copies. That is a summary of the licence text, not legal advice, and if you are shipping a product you should read LICENSE.md yourself and consult counsel where it matters.
One citation obligation is worth noting for academic users. The README asks that publications using the package cite the SIMULATION journal paper, and CITATION.bib is provided at the repository root for that purpose. That is a community norm rather than a licence term, but reviewers do ask.
Editorial conclusion
Adopt Agents.jl if your model lives in Julia and you want a short path from an agent type and a step function to a running simulation, including Open Street Maps spaces or Reinforcement Learning integration. Skip it if your team is committed to Python or if you need a visual model builder rather than code. Before committing, verify that the current release supports the space type you need on your Julia version, and read CHANGELOG.md for breaking changes between major versions.
Frequently asked questions
What is Agents.jl and what is it used for?
Agents.jl is a pure Julia general-purpose framework for agent-based modeling, where autonomous agents react to their environment and to each other under predefined rules. It supports discrete-time simulations, event-queue based continuous time simulations, and native Reinforcement Learning integration.
How do I install Agents.jl?
It is a registered Julia package, so it installs through the Julia package manager; the README points to the online documentation for the setup steps rather than printing a snippet. The documentation can also be built locally by running the docs/make.jl file.
Does Agents.jl work with languages other than Julia?
No. The README describes it as a pure Julia framework, and the repository does not document bindings for Python or any other language. If your team writes Python, this is not a drop-in option.
Can Agents.jl simulate agents on real maps?
Yes. The README lists straightforward simulation on Open Street Maps as one of the framework's distinguishing features, alongside traditional grid and other spatial structures shown in the examples directory.
Community notes