Startle responses triggered by aversive stimuli including predators are widespread across animals. These coordinated whole-body actions require the rapid and simultaneous activation of a large number of muscles. Here we study a startle response in a planktonic larva to understand the whole-body circuit implementation of the behaviour. Upon encountering water vibrations, larvae of the annelid Platynereis close their locomotor cilia and simultaneously raise the parapodia. The response is mediated by collar receptor neurons expressing the polycystins PKD1-1 and PKD2-1. CRISPR-generated PKD1-1 and PKD2-1 mutant larvae do not startle and fall prey to a copepod predator at a higher rate. Reconstruction of the whole-body connectome of the collar-receptor-cell circuitry revealed converging feedforward circuits to the ciliary bands and muscles. The wiring diagram suggests circuit mechanisms for the intersegmental and left-right coordination of the response. Our results reveal how polycystin-mediated mechanosensation can trigger a coordinated whole-body effector response involved in predator avoidance.