Abstract:Urban agriculture is a crucial component of modern agriculture and urban systems. Enhancing the multifaceted functional values of urban agriculture is of significant importance for accelerating agricultural transformation, promoting urban-rural integration, and fostering the development of more sustainable cities. Territorial spatial planning, as a spatial blueprint for sustainable development, plays a vital role in promoting the functional values of urban agriculture. This paper first systematically analyzes the connotations and characteristics of the functional values of urban agriculture. It then examines the logical framework and practical challenges in realizing these values from the perspective of supply and demand. Finally, by exploring the role of territorial spatial planning in achieving these functional values, the paper proposes a pathway and recommendations for “realizing the functional values of urban agriculture in territorial spatial planning” by facilitating the development of a balanced, supply-demand aligned approach to urban agriculture’s multifaceted functions within the system of territorial spatial planning. The results indicate that: 1) Urban agriculture is closely integrated with cities, and besides sharing common characteristics of traditional agriculture, it also exhibits unique features such as symbiosis, efficiency, complexity, and personalization. It provides fundamental agricultural functions, such as supplying fresh agricultural products and promoting agricultural technological innovation, as well as extended functions like purifying the urban environment, promoting resource recycling, beautifying urban landscapes, preserving agrarian culture, and enriching urban experiences. Supported by the theories of supply-demand equilibrium, industrial multifunctionality, urban-rural integration, and agricultural location theory, the paper explores effective pathways for fully realizing the multifaceted functional values of urban agriculture. 2) Urban agriculture faces challenges such as mismatches between the supply of production factors and the demand for industrial upgrading, mismatches between the supply of agricultural products and the demand structure of urban residents, and mismatches between agricultural production methods and urban ecological resource protection. Addressing these challenges requires territorial spatial planning that strengthens the protection and rational use of agricultural resources on the supply side, and enhances planning guidance, spatial control, element assurance, and policy support on the demand side. 3) The paper proposes five core tasks for promoting the realization of agricultural values: conducting systematic evaluations to assess the foundation of urban agriculture development; confirming the targets to clarify the direction of development; strengthening spatial guidance to establish the development pattern; optimizing industrial guidance to propose strategies for urban agriculture growth; and improving institutional mechanisms to form protective measures for urban agriculture development. These tasks are implemented through three types of planning, “general planning, specialized planning, and detailed planning”, ensuring the orderly development of urban agriculture and constructing a method for achieving its functional values based on supply-demand fit. The realization of urban agriculture's functional values should be considered a key objective in the territorial spatial planning of the new era, requiring systematic and comprehensive guidance to optimize the allocation of agricultural resources within urban spaces.