Ride-sourcing platforms enable an on-demand shared transport service by solving decision problems often related to customer matching, pricing and vehicle routing. These problems have been frequently represented using aggregated mathematical models and solved via algorithmic approaches designed by researchers. The increasing complexity of ride-sourcing environments compromises the accuracy of aggregated methods. It, therefore, signals the need for alternative practices such as agent-based models which capture the level of complex dynamics in ride-sourcing systems. The use of these agent-based models to simulate ride-sourcing fleets has been a focal point of many studies; however, this occurred in the absence of a prescribed approach on how to build the models to mimic fleet operations realistically. To bridge this research gap, we provide a framework for building bespoke agent-based models for ride-sourcing fleets, derived from the fundamentals of agent-based modelling theory. We also introduce a model building sequence of the different modules necessary to structure a simulator based on our framework. To showcase the strength of our framework, we use it to tackle the highly non-linear problem of minimum fleet size estimation for autonomous ride-sourcing fleets. We do so by investigating the relationship of system parameters based on queuing theory principles and by deriving and validating a novel model for pickup wait times. By modelling the ride-sourcing fleet function in the urban areas of Manhattan, San Francisco, Paris and Barcelona, we find that ride-sourcing fleets operate queues with zero assignment times above the critical fleet size. We also show that pickup wait times have a pivotal role in the estimation of the minimum fleet size in ride-sourcing operations, with agent-based modelling to be a more reliable route for their identification given the system parameters.