This thesis presents a novel framework for formation control in Multi-Agent Systems (MAS) under switching communication topologies. While existing approaches predominantly rely on fixed topologies, this work introduces a solution that combines directed graph and switching topologies with Input-to-State Safety (ISSf) concepts. The proposed framework extends single-agent ISSf principles to multi-agent scenarios, ensuring collective safety despite external disturbances. The main contributions of this thesis include: (1) development of a robust control framework that accommodates switching topologies while maintaining desired formation, (2) extension of ISSf principles to multi-agent scenarios, ensuring collective safety under external disturbances, and (3) integration of consensus algorithms with obstacle and collision avoidance mechanisms that adapt to dynamic communication. The methodology employs a consensus-based control algorithm developed to maintain desired formations while accommodating dynamic topology changes. The system’s effectiveness is validated through simulations with four agents navigating environments containing both static and moving obstacles and collision avoidance. Simulation results demonstrate successful formation convergence, obstacle avoidance and collision avoidance, with agents maintaining safe distances throughout their trajectories.