Cooperation is the process of synchronization and exchanging useful knowledge between agents in multiagent systems. Since cooperation associates agents into a collaborative team to reach the overall goals of the systems, it is a crucial requirement for creating intelligent multiagent systems . This paper presents an approach for building complex cooperation protocols from simple primitives called collective operations. Collective operations are implemented in a new agent oriented programming language named Yaccai. The syntax and semantics of collective operations are designed to be effective for description of cooperation protocols while maintaining the autonomous computational model of agents. Our experiment shows that, collective operations are flexible building blocks for realization of cooperative multiagent systems.