The Lagrangian transport in the laminar incompressible flow in a two-dimensional square cavity driven by a harmonic tangential oscillation of the lid is investigated numerically for a wide range of Reynolds and Strouhal numbers. The topology of fluid trajectories is analyzed by stroboscopic projections revealing the co-existence of chaotic trajectories and regular Kolmogorov–Arnold–Moser (KAM) tori. The pathline structure strongly depends on the Reynolds number and the oscillation frequency of the lid. Typically, most pathlines are chaotic when the oscillation frequency is small, with few KAM tori being strongly stretched along instantaneous streamlines of the flow. As the frequency is increased, the fluid motion becomes more regular and the size of the KAM tori grows until, at high frequencies, they resemble streamlines of a mean flow.