Abstract4D printing is the next step in additive manufacturing. Magnetoresponsive materials facilitate the creation of gripping tools through 4D printing, allowing for structural changes in response to external stimuli. In this study, the structural change is manifested as motion, triggered by an external magnetic field. This technology offers significant advantages in medical and industrial applications, including the printing of life-like moving organ models for medical training and the development of actuators for use in explosive environments. Magnetoresponsive materials are programmed with a magnetic profile and actuated by an external magnetic field. A compound of strontium ferrite microparticles $$SrFe_{12}O_{19}$$ S r F e 12 O 19 ($$ \le 20\mu m$$ ≤ 20 μ m ) and an elastic polymer (thermoplastic copolyester) with a Hardness of Shore D 40 was produced. A star-shaped body was programmed and actuated by two permanent magnets, each of $$B_r=1.29 - 1.32T$$ B r = 1.29 - 1.32 T . As there is no analytical approach for calculating the required actuation flux density, one has been developed. The approach is verified experimentally by using a Hall probe. It is appropriate to set the field with a Helmholtz coil, despite the utilization of two permanent magnets. The use of a commercial fused filament fabrication printer for the processing of magnetoresponsive materials has been realized here for the first time. The main contributions are the short time constant (around $$t_a=0.1s$$ t a = 0.1 s ) for actuation and the repeatability (around $$n=200$$ n = 200 actuation cycles) of the motion. The feasibility of multiple diverse reprogramming is a step forward in 4D printing. Hence, the post-print programming and the inhomogeneity of the field limit the ease of the presented method.