AI integrates with EHRs by analyzing the extensive data they contain, such as patient history, lab results, and treatment outcomes. This integration allows AI to generate insights and recommendations, facilitating more informed decision-making and personalized care.