Astragalus agrestis is a species of milkvetch known by the common names purple milkvetch, purple loco, and field milkvetch. It is native to much of western and northern North America from most of Canada to the southwestern United States, as well as eastern Asia. It grows in vernally moist areas such as meadows, and is often found in sagebrush.
This is a perennial herb growing a slender but sturdy stem from an underground caudex. It leans or grows upright to a maximum height near 30 centimeters. The stem is often roughly hairy. Alternately arranged leaves are up to 10 centimeters long and made up of several pairs of leaflets up to 2 centimeters long each. They are oval to lance-shaped and may have notched tips. The inflorescence is an oval-shaped cluster of up to 15 purple or pink-tinted to nearly white pealike flowers. Each flower is up to 2 centimeters long.
The fruit is an oval-shaped legume pod up to a centimeter long. It is dark colored with white hairs and dries to a papery texture.