In this paper, we consider a control strategy of multiagent systems, or simply, swarms, based on artificial potential functions and the sliding-mode control technique. First, we briefly discuss a "kinematic" swarm model in n-dimensional space introduced in an earlier paper. In that model, the interindividual interactions are based on artificial potential functions, and the motion of the individuals is along the negative gradient of the combined potential. After that, we consider a general model for vehicle dynamics of each agent (swarm member), and use sliding-mode control theory to force their motion to obey the dynamics of the kinematic model. In this context, the results for the initial model serve as a "proof of concept" for multiagent coordination and control (swarm aggregation), whereas the present results serve as a possible implementation method for engineering swarms with given vehicle dynamics. The presented control scheme is robust with respect to disturbances and system uncertainties.