This paper presents a model---SharedActivity---for collaborative agents acting in a group. The model suggests mental states for agents with different levels of cooperation and permits the formation of groups in which members increase individual benefits. Unlike previous models, the model covers group member behavior where group members do not have a joint goal, but act collaboratively. The model defines key components of a collaborative activity and provides a platform for supporting such activity. We studied the behavior of the model in a simulation environment. Results show how the benefit attained by cooperation is influenced by the complexity of the environment, the number of group members, and the social dependencies between the members. The results demonstrate that the model covers social behavior both in settings previously addressed, as well as in novel settings.