Background: Conversational agents (artificial intelligence [AI]–based chatbots) offer a novel approach to health interventions by providing personalized, adaptive interactions that improve over time based on user engagement. In nutrition education, given the wide variation in knowledge, skills, and abilities across participants, AI-based chatbots have the potential to enhance accessibility, engagement, and behavior change. Food is Medicine (FIM) interventions, which aim to improve food security and diet quality among multicultural, at-risk populations, often face challenges related to sustained engagement and use. Objective: This paper describes the design, development, and iterative refinement of a bilingual AI-driven nutrition chatbot integrated into an FIM intervention for high-risk pregnant women receiving care at obstetric clinics in Houston, Texas. Methods: The chatbot was developed using an iterative process informed by behavioral theory, human-centered design (HCD), and plan-do-study-act (PDSA) quality improvement cycles. The conversational agent was embedded within an ongoing 2-arm randomized controlled trial (N=200) comparing standard FIM nutrition education to FIM plus AI-driven nutrition chatbot support. HCD activities took place prior to deployment and involved community advisory group members and implementation stakeholders. Postdeployment refinements were guided by 2 PDSA cycles and informal question-and-answer sessions conducted with intervention arm participants. Qualitative feedback was collected using structured scripts to identify facilitators of and barriers to chatbot engagement. Results: The chatbot was developed using the GPT-3.5 Turbo application programming interface. An initial prototype built in Python using Gradio enabled rapid testing but lacked flexibility for modifications. To improve scalability and logging capabilities, the system was rebuilt using PHP, HTML, JavaScript, and SQL. To further understand usage patterns, participants who interacted with the chatbot at least once or not at all (classified as low users; n=32) were engaged in question-and-answer sessions. Of these participants, all were female (32/32, 100%), 88% (28/32) identified as Hispanic or Latino, and 90% (29/32) preferred Spanish. Two PDSA cycles guided iterative refinements. Cycle 1 identified low initial engagement, whereas cycle 2 focused on improving content clarity and cultural relevance through physical reminder prompts. Qualitative findings identified key barriers to engagement, including high cooking self-efficacy with perceived lack of need for support, low technology self-efficacy, and low urgency due to competing priorities. Conclusions: Embedding a bilingual AI-driven nutrition chatbot within an FIM intervention was feasible and featured critical design and implementation considerations for engaging high-risk pregnant populations. Findings show the importance of HCD and iterative refinement to address engagement barriers. This work provides actionable guidance for integrating conversational agents into FIM programs, with implications for future evaluation of clinical outcomes, long-term engagement, and scalability. Trial Registration: ClinicalTrials.gov NCT07165990; https://clinicaltrials.gov/study/NCT07165990
<img src="https://jmir-production.s3.us-east-2.amazonaws.com/thumbs/a63127d3ad7741a792dfe16a916ed09f" />