Agroforestry refers to any of a broad range of land use practices where pasture or crops are integrated with trees and shrubs. This intentional combination of agriculture and forestry has multiple benefits, such as greatly enhanced yields from staple food crops, enhanced farmer livelihoods from income generation, increased biodiversity, improved soil structure and health, reduced erosion, and carbon sequestration. Trees in agroforestry systems can also produce wood, fruits, nuts, and other useful products with economic and practical value. Agroforestry practices are especially prevalent in the tropics, especially in subsistence smallholdings areas  with particular importance in sub-Saharan Africa. However, due to its multiple benefits, for instance in nutrient cycle benefits and potential for mitigating droughts, it has been adopted in the USA and Europe .
Agroforestry shares principles with intercropping but can also involve much more complex multi-strata agroforests containing hundreds of species. Agroforestry can also utilise nitrogen-fixing plants such as legumes to restore soil nitrogen fertility. The nitrogen-fixing plants can be planted either sequentially or simultaneously.
According to Paul Wojtkowski, the theoretical base for agroforestry lies in ecology, or agroecology. Agroecology encompasses diverse applications such as: improved nutrient and carbon cycling; water retention of soils; biodiverse habitats; protection from pest, disease and weed outbreaks; protection of soils from water and wind erosion, etc. From this perspective, agroforestry is one of the three principal agricultural land-use sciences. The other two are agriculture and forestry.
There is still not enough data to determine the full range of the impacts and benefits varying agroforestry practices could have. The indigenous practices that form the inspiration and basis for agroforestry are frequently complex, including a large array of species. The most studied agroforestry practices involve a simple interaction between two components, such as simple configurations of hedges or trees integrated with a single crop. There is significant variation in agroforestry systems and the benefits they have. Agroforestry as understood by modern science is derived from traditional indigenous and local practices, developed by living in close association with ecosystems for many generations. Although these agroforestry practices have sometimes been excluded from consideration as part of the "scientific" theory and practice of agroforestry, they form the foundation for modern agroforestry, and have enduring potential for future study and application.
Agroforestry systems can be advantageous over conventional agricultural and forest production methods. They can offer increased productivity; social, economic and environmental benefits, as well as greater diversity in the ecological goods and services provided. It is essential to note that these benefits are conditional on good farm management. This includes choosing the right trees, as well as pruning them regularly etc. 
Biodiversity in agroforestry systems is typically higher than in conventional agricultural systems. Two or more interacting plant species in a given area create a more complex habitat that can support a wider variety of fauna.
Agroforestry is important for biodiversity for different reasons. It provides a more diverse habitat than a conventional agricultural system in which the tree component creates ecological niches for a wide range of organisms both above and below ground. The life cycles and food chains associated with this diversification initiates an agroecological succession that creates functional agroecosystems that confer sustainability. Tropical bat and bird diversity for instance can be comparable to the diversity in natural forests. Although agroforestry systems do not provide as many floristic species as forests and do not show the same canopy height, they do provide food and nesting possibilities. A further contribution to biodiversity is that the germplasm of sensitive species can be preserved. As agroforests have no natural clear areas, habitats are more uniform. Furthermore, agroforests can serve as corridors between habitats. Agroforestry can help to conserve biodiversity having a positive influence on other ecosystem services.
Depleted soil can be protected from soil erosion by groundcover plants such as naturally growing grasses in agroforestry systems. These help to stabilise the soil as they increase cover compared to short-cycle cropping systems. Soil cover is a crucial factor in preventing erosion. Cleaner water through reduced nutrient and soil surface runoff can be a further advantage of agroforestry. Trees can help reduce water runoff by decreasing water flow and evaporation and thereby allowing for increased soil infiltration. Compared to row-cropped fields nutrient uptake can be higher and reduce nutrient loss into streams.
Further advantages concerning plant growth:
Agroforestry systems can provide a number of ecosystem services which can contribute to sustainable agriculture in the following ways;
According to FAO's The State of the World’s Forests 2020, adopting agroforestry and sustainable production practices, restoring the productivity of degraded agricultural lands, embracing healthier diets and reducing food loss and waste are all actions that urgently need to be scaled up. Agribusinesses must meet their commitments to deforestation-free commodity chains and companies that have not made zero-deforestation commitments should do so.
Carbon sequestration is an important ecosystem service. Agroforestry practices can increase carbon stocks in soil and woody biomass. Trees in agroforestry systems, like in new forests, can recapture some of the carbon that was lost by cutting existing forests. They also provide additional food and products. The rotation age and the use of the resulting products are important factors controlling the amount of carbon sequestered. Agroforests can reduce pressure on primary forests by providing forest products.
Agroforestry practices may realize a number of environmental goals, such as:
Agroforestry can significantly contribute to climate change mitigation along with adaptation benefits. A case study in Kenya found that the adoption of agroforestry drove carbon storage and increased livelihoods simultaneously among small-scale farmers. In this case, maintaining the diversity of tree species, especially land use and farm size are important factors.
Especially in recent years, poor smallholder farmers turned to agroforestry as a means to adapt to climate change. A study from the CGIAR research program on Climate Change, Agriculture and Food Security (CCAFS) found from a survey of over 700 households in East Africa that at least 50% of those households had begun planting trees in a change from earlier practices. The trees were planted with fruit, tea, coffee, oil, fodder and medicinal products in addition to their usual harvest. Agroforestry was one of the most widespread adaptation strategies, along with the use of improved crop varieties and intercropping.
Research with Faidherbia albida in Zambia showed maximum maize yields of 4.0 tonnes per hectare using fertilizer and inter-cropped with these trees at densities of 25 to 100 trees per hectare, compared to average maize yields in Zimbabwe of 1.1 tonnes per hectare.
A well-studied example of an agroforestry hillside system is the Quesungual Slash and Mulch Agroforestry System (QSMAS) in Lempira Department, Honduras. This region was historically used for slash-and-burn subsistence agriculture. Due to heavy seasonal floods, the exposed soil was washed away, leaving infertile barren soil exposed to the dry season. Farmed hillside sites had to be abandoned after a few years and new forest was burned. The Food and Agriculture Organization of the United Nations (FAO) helped introduce a system incorporating local knowledge consisting of the following steps:
With shade applications, crops are purposely raised under tree canopies within the shady environment. The understory crops are shade tolerant or the overstory trees have fairly open canopies. A conspicuous example is shade-grown coffee. This practice reduces weeding costs and improves coffee quality and taste.
Crop-over-tree systems employ woody perennials in the role of a cover crop. For this, small shrubs or trees pruned to near ground level are utilized. The purpose is to increase in-soil nutrients and/or to reduce soil erosion.
See also: Inga alley cropping
With alley cropping, crop strips alternate with rows of closely spaced tree or hedge species. Normally, the trees are pruned before planting the crop. The cut leafy material - for example, from Alchornea cordifolia and Acioa barteri - is spread over the crop area to provide nutrients. In addition to nutrients, the hedges serve as windbreaks and reduce erosion.
In tropical areas of North and South America, various species of Inga such as I. edulis and I. oerstediana have been used for alley cropping.
Intercropping is advantageous in Africa, particularly in relation to improving maize yields in the sub-Saharan region. Use relies upon the nitrogen-fixing tree species Sesbania sesban, Tephrosia vogelii, Gliricidia sepium and Faidherbia albida. In one example, a ten-year experiment in Malawi showed that, by using the fertilizer tree Gliricidia (G. sepium) on land on which no mineral fertilizer was applied, maize/corn yields averaged 3.3 metric tons per hectare (1.5 short ton/acre) as compared to 1 metric ton per hectare (0.45 short ton/acre) in plots without fertilizer trees or mineral fertilizers.
Weed control is inherent to alley cropping, by providing mulch and shade.
Taungya is a system originating in Burma. In the initial stages of an orchard or tree plantation, trees are small and widely spaced. The free space between the newly planted trees accommodates a seasonal crop. Instead of costly weeding, the underutilized area provides an additional output and income. More complex taungyas use between-tree space for multiple crops. The crops become more shade tolerant as the tree canopies grow and the amount of sunlight reaching the ground declines. Thinning can maintain sunlight levels.
Itteri agroforestry systems have been used in Tamil Nadu since time immemorial. They involve the deliberate management of multipurpose trees and shrubs grown in intimate association with herbaceous species. They are often found along village and farm roads, small gullies, and boundaries of fields.
Bamboo-based agroforestry systems (Dendrocalamus strictus + sesame–chickpea) have been studied for enhancing productivity in semi-arid tropics of central India.
A project to mitigate climate change with agriculture was launched in 2019 by the "Global EverGreening Alliance". The target is to sequester carbon from the atmosphere. By 2050 the restored land should sequestrate 20 billion tons of carbon annually
Although originally a concept used in tropical agronomy, the USDA distinguishes five applications of agroforestry for temperate climates.
Alley cropping (see above) can also be used in temperate climates. Strip cropping is similar to alley cropping in that trees alternate with crops. The difference is that, with alley cropping, the trees are in single row. With strip cropping, the trees or shrubs are planted in wide strip. The purpose can be, as with alley cropping, to provide nutrients, in leaf form, to the crop. With strip cropping, the trees can have a purely productive role, providing fruits, nuts, etc. while, at the same time, protecting nearby crops from soil erosion and harmful winds.
Trees can benefit fauna. The most common examples are silvopasture where cattle, goats, or sheep browse on grasses grown under trees. In hot climates, the animals are less stressed and put on weight faster when grazing in a cooler, shaded environment. The leaves of trees or shrubs can also serve as fodder.
Similar systems support other fauna. Deer and pigs gain when living and feeding in a forest ecosystem, especially when the tree forage nourishes them. In aquaforestry, trees shade fish ponds. In many cases, the fish eat the leaves or fruit from the trees.
The dehesa or montado system of silviculture are an example of pigs and bulls being held extensively in Spain and Portugal.
Since the 1950s, four-fifths of Swiss Hochstammobstgärten (traditional orchards with tall trees) have disappeared. An agroforestry scheme was tested here with hochstamm trees together with annual crops. Trees tested were walnut (Juglans regia) and cherry (Prunus avium). Forty to seventy trees per hectare were recommended, yields were somewhat decreasing with increasing tree height and foliage. However, the total yield per area is shown to be up to 30 percent higher than for monocultural systems.
Another set of tests involve growing Populus tremula for biofuel at 52 trees a hectare and with grazing pasture alternated every two to three years with maize or sorghum, wheat, strawberries and fallowing between rows of modern short-pruned & grafted apple cultivars ('Boskoop' & 'Spartan') and growing modern sour cherry cultivars ('Morina', 'Coraline' and 'Achat') and apples, with bushes in the rows with tree (dogrose, Cornus mas, Hippophae rhamnoides) intercropped with various vegetables.
Though the formal scientific study of agroforestry is relatively new, beginning in the 20th century with ethnobotanical studies carried out by anthropologists, agroforestry has existed for centuries, practiced by local and/or indigenous communities that lived in close relationship with forest ecosystems. Native American forestry practices are an example of this. Indigenous peoples of California periodically burned oak and other habitats to maintain a 'pyrodiversity collecting model'. This method allowed for greater tree health and improved habitat in general.
Although agroforestry systems can be advantageous, they are not widespread in the US as of 2013.
As suggested by a survey of extension programs in the United States, obstacles (ordered most critical to least critical) to agroforestry adoption include:
Some solutions to these obstacles have been suggested.
((cite journal)): CS1 maint: multiple names: authors list (link)