Artificial general intelligence revived in recent years after people achieved significant advances in machine learning and deep learning. This leads to the thinking of how real intelligence could be created. Consciousness theories believe that general intelligence is essentially conscious, yet no universal definition is agreed on the definition. In this work, a systematic theory of consciousness, Global Workspace Theory, is implemented and integrated with crucial cognitive components. The focus of this paper is episodic memory. With inspiration from the natures of episodic memory in psychology and neuroscience, the episodic memory component is implemented in the Global Workspace framework. The robotic agent operates in a real-world interactive context, forming episodic memory and demonstrating static, temporal and context memory capabilities during interactions. Consciousness in this work engages in all formation, maintenance, and retrieval processes of episodic memory. The novelties and contributions of this work are 1) this work is implementing episodic memory within the consciousness framework, suggesting the sustainable potential of such an integrated approach to cognitive agents with AGI; 2) Regarding the limited examples in consciousness-based cognitive architectures, this work attempts to contribute to the diversity of perspectives and approaches; 3) Extant episodic memory implementations are suffering from various limitations, while This work summarises some key features for modelling episodic memory within a cognitive architecture; 4) Authors discuss the relationship between episodic memory, consciousness and general intelligence, proposing the compatibility and relationship between machine consciousness and other AGI research. It is believed that a better alignment between them would further boost the fusion of diverse research for achieving the desired cognitive machines.