AbstractA lot of work is devoted to analysing architectures for coordinating the behaviour of individual agents. However, providing agents with abilities to migrate continues to be a highly challenging problem. We propose a novel multi-agent framework, called Agent-based Migration (AM). We begin by defining the principal objective, which is the migration phenomenon applied, in our case, to distributed calculation of prime numbers. We present the AM architecture in detail. Then, we introduce different types of migration and the communication scheme. We also conduct a set of experiments in two environments: 4 heterogeneous computers and 45 (almost) homogeneous computers. Specifically, we are looking for a way to find optimal configurations for migration in both environments. The conclusion from this work is that introducing propagation to a system in a form of agent migration in both networks could considerably decrease the execution time according to used algorithms and established assumptions.