The keeping of livestock has been posited as a risk factor for the emergence of zoonoses and the spread of antimicrobial resistance. However, quantitative evidence regarding the major sources of pathogenic and drug-resistant bacteria and transmission routes between hosts remains lacking. In the largest epidemiological study of this nature to date, we sampled Escherichia coli from humans, livestock, food, wildlife and the environment of 99 households across Nairobi, Kenya to gain a deeper understanding of sharing of bacteria among hosts and potential reservoirs. By analysing whole genome sequencing data from 1,338 E. coli isolates, we reconstruct sharing patterns for the sampled E. coli and its antimicrobial resistance determinants. We find that the diversity and sharing patterns of E. coli is heavily structured by household, which is the primary epidemiological interface for bacterial strain sharing. Strain sharing within households was strongly shaped by host type. We also find evidence for inter-household and inter-host sharing, and importantly, between humans and animals, although this occurs much less frequently. We find similar strain sharing patterns for the E. coli accessory genome, suggesting that it is shaped by recent evolutionary history and is strongly associated with the core genome. Resistome similarity, however, were quite differently distributed across host and household, consistent with their being driven by shared exposure to antimicrobials. Our results indicate that there is potential for the exchange of bacteria between humans, livestock and wildlife in the same household in a tropical urban setting, with wider mixing occurring over a period of months or years, but this does not drive the distribution of antimicrobial resistance.