The integration of Artificial Intelligence (AI) in medical procedures marks a transformative era in healthcare, especially in endoscopy and surgery. This article delves into the revolutionary impact of AI in these fields, emphasizing its role in improving diagnostic accuracy, surgical precision, and overall patient outcomes. Endoscopic procedures have greatly benefited from the digitization of tools and the introduction of high-resolution imaging technologies. AI, particularly through supervised deep learning, has taken these advancements further by enabling the development of computer-assisted interventions (CAI). These interventions enhance capabilities such as improved navigation during procedures, automated image interpretation, and even robotic tool manipulation. AI-powered systems in endoscopy are increasingly capable of detecting and diagnosing lesions more accurately than traditional methods. Early CADe systems focused on detecting specific visual features linked to diseases. However, contemporary deep learning approaches learn from the data directly, thereby enhancing the detection and classification of abnormal tissue without predefined assumptions. AI has introduced significant improvements in endoscopic navigation and the analytical reporting of procedures. Techniques like Simultaneous Localization And Mapping (SLAM) have evolved from conventional methods to deep learning-based approaches, which help in real-time dense reconstruction of endoscopic scenes. These advancements facilitate more precise navigations and interventions, potentially reducing procedural risks. The synergy between robotic technologies and AI is paving the way for more refined and minimally invasive surgical procedures. AI enhances robotic surgery by improving the feedback mechanisms and data integration from various sensors, leading to more accurate and less invasive interventions. As AI and robotics become more embedded in clinical settings, regulatory frameworks need to evolve to ensure patient safety and efficacy of AI-based medical devices. The ethical dimensions of deploying AI in surgery, such as accountability and transparency, are also crucial areas of focus to gain public trust and acceptance. Despite the promising advancements, several challenges remain. These include the need for larger, well-annotated datasets for training AI systems, addressing the generalizability of AI applications across different anatomical sites, and integrating heterogeneous data types effectively. Overcoming these obstacles is essential for maximizing the potential of AI in enhancing endoscopic and surgical practices. AI is set to revolutionize endoscopy and surgery by providing tools that enhance the precision and efficiency of medical interventions. While challenges persist, the ongoing research and development in this field promise to unlock further innovations that could redefine standards of care in gastroenterology and surgery, leading to better patient outcomes and streamlined clinical workflows.