Restructuring in power systems has resulted in the development of microgrids (MGs) as entities that could be operated in grid-connected or islanded modes while managing the operation of their systems. On the other hand, privatization and integration of independently operated distributed resources in energy systems have caused the introduction of multi-agent structures. In this regard, new operational management methodologies should be employed by the MG operator (MGO) to efficiently operate the system while addressing the distributed nature of multi-agent structures. Accordingly, this paper aims to provide a new algorithm to operate an islanded multi-agent MG utilizing the peer-to-peer (P2P) management concept; which copes with the distributed nature of the system. Consequently, each agent would independently schedule its respective local resources, while participating in the hourly P2P market scheme. Moreover, MGO manages the power transactions among the agents. Furthermore, different types of power generation resources are modeled in the proposed optimization scheme while scenario-based stochastic optimization, as well as the condition-value-at-risk index, are deployed to address the uncertainty and the operational risk associated with the operational optimization of renewable energies. Finally, the developed framework is implemented on a 10-bus-MG test system to investigate its effectiveness in the management of the system and also on a 33-bus-MG test system to study its scalability.