This paper studies the consensus problem of multiagent system with packet losses and communication delays under directed communication channels. Different from previous research results, a novel control protocol is proposed depending only on periodic sampling and transmitting data in order to be convenient for practical implementation. Due to the randomicity of transmission delays and packet losses, each agent updates its input value asynchronously at discrete time instants with synchronized time stamped information and evolves in continuous time. Consensus conditions for multiagent system consists of three typical dynamics including single integrator, double integrator, and high-order integrator that are all discussed in this paper. It is proved that, for single integrator agents and double integrator systems with only communication delays, consensusability can be ensured through stochastic matrix theory if the designed communication topology contains a directed spanning tree. While, for double integrator agents and high-order integrator agents with packet losses and communication delays, the interval system theory is introduced to prove the consensus of multiagent system under the condition that the designed communication topology is a directed spanning tree. Finally, simulations are carried out to validate the effectiveness of the proposed solutions.