The collective escape of predators by prey is a classic example of adaptive behavior in animal groups. Across species, prey has evolved a large repertoire of individual evasive maneuvers they can use to evade predators. With recent technological advances, more empirical data of collective escape is becoming available, and a large variation in the collective dynamics of different species is apparent. However, given the complexity of patterns of collective escape, we are still lacking the tools to understand their emergence. Computational models that can link rules of individual behavior to patterns of collective escape are needed, but species-specific motion and escape characteristics that will allow the link between behavior and eco-evolutionary dynamics of a given species are rarely included in agent-based models of collective behavior. Here, to tackle this challenge, we introduce a framework that uses individual-based state machines to model spatio-temporal dynamics of collective escape. A synthetic agent in our framework can switch its behavior between 'flocking' with different coordination specifics (e.g., quicker interactions when vigilant) and 'escape' with various maneuvers through a dynamic Markov-chain, depending on its local information (e.g., its relative position to the predator). A user can compose a new agent-based model adjusted to empirical data by choosing a set of states (which includes rules of motion, interaction, and escape), their temporal order, and a detailed parameterization. The flexibility and structure of our software allows substantial changes in a model with very minimal code alterations, showing great potential for future use to identify the underlying mechanisms of collective escape across species and ecological contexts.