This article describes preliminary work on a research environment called Virtus that is a web-based learning system tailored to enhance group working and collaborative learning. We discuss the main issues of introducing group contracts based on roles and rules to support social regulation in collaborative learning environments. Based on this role-based approach, we propose a system architecture which the main attention is given to the group support in order to provide some automatic group management features.