Urban agriculture is increasingly invoked in debates on sustainable and smart urban development, yet cities still lack a structured method for comparing the ecological, social, and economic implications of distinct urban agriculture models. This manuscript presents a participatory Analytic Hierarchy Process (AHP) framework for evaluating urban agriculture in a form directly relevant to strategic planning in compact cities. The study is based on a two-stage German case design. First, a European expert survey identified priority sub-criteria for sustainability assessment; 35 valid expert responses (29\% response rate) were obtained from an expert pool of approximately 120 researchers. Second, a stakeholder survey in Germany weighted the selected criteria; 141 valid responses (28% overall response rate) were collected from urban administrations, non-governmental organisations, and practitioners or technical-scientific experts. The resulting AHP structure prioritises the environmental dimension (42%), followed by the social (34%) and economic (24%) dimensions, indicating a strong-sustainability orientation. At the sub-criterion level, biodiversity received the highest overall priority, while food quality and safety received the lowest. The framework identifies biodiversity, circular economy, local microclimate and hydrology regulation, community building and social justice, knowledge sharing and education, participation in food production, local value chains, affordability, and food quality and safety as the most relevant decision variables for urban agriculture assessment. Framed for a journal focused on urban development and smart cities, the article demonstrates that urban agriculture should be treated not as a generic green intervention, but as a governance-sensitive, multi-criteria planning decision requiring transparent prioritisation under conditions of land scarcity, competing urban functions, and diverse stakeholder values.