In this paper, I elaborate on the role of agent-based (AB) modelling for macroeconomic research. My main tenet is that the full potential of the AB approach has not been realised yet._x000d_ This potential lies in the modular nature of the models, which is bought by abandoning the straitjacket of rational expectations and embracing an evolutionary perspective. I envisage the foundation of a Modular Macroeconomic Science, where new models with heterogeneous interacting agents, endowed with partial information and limited computational ability, can be created by recombining and extending existing models in a unified computational framework. _x000d_ This crucially requires the development of appropriate application programming interfaces (APIs), a set of routines, protocols, and tools which define functionalities internally used by the simulated agents (e.g. learning algorithms) or used by the agents to interact with other agents (exchange of information, goods and services) that are independent of their respective implementations.