Bloodborne pathogens are a major public health concern as they can lead to a variety of medical conditions, including cirrhosis and cancers with significant mortality and morbidity. Three viruses are of major concern: HCV, HBV and HIV. Their transmission is mostly community-associated but the iatrogenic risk of infection is not negligible, even today. Mathematical models are widely used to describe and assess pathogens transmission, within communities and hospitals. Nevertheless, few are focusing on the transmission of pathogens through blood and even fewer on their transmission within hospital as they usually study the risk of community-associated infection in vulnerable populations such as MSM or drug users. Herein, we propose an agent-based SEI (Susceptible-Exposed-Infected) model to explore the transmission dynamics of bloodborne pathogens within hospitals. This model simulates the dynamics of patients between hospital wards, from their admission to discharge, as well as the dynamics of the devices used during at-risk invasive procedures, considering that patient contamination occurs after exposure to a contaminated device. Multiple parameters of the model, such as HCV prevalence, transition probabilities between wards or ward-specific probabilities of undergoing different invasive procedures, were informed with data collected in the University Hospital of Ain Shams in Cairo, Egypt in 2017. We explored the effect of device shortage as well as the effect of random and systematic screening with associated modification in disinfection practices on the risk of infection for patients. By modifying some parameters of the model, we then explored the case of HBV in Ethiopia. In the future, this model could be used to assess the risk of transmission of other bloodborne pathogens in other contexts.