The spatial ecology of sloths was studied in an agricultural landscape in Limón Province, Costa Rica. Two sloth species, the three-toed sloth (Bradypus variegatus) and the two-toed sloth (Choloepus hoffmanni), actively used and traveled through a cacao agroforest and its contiguous living fence rows and riparian forests. This agroecosystem was embedded in an agricultural landscape dominated by banana and pineapple plantations and pastures with dispersed trees. The two-toed sloth (C. hoffmanni) was found in 101 tree species and used 34 for food; the three-toed sloth (B. variegatus) was found in 71 tree species and used 15 for food. Choice of preferred species differed between the two sloth species. Trees commonly used by sloths for food and/or refuge in the cacao agroforest included Erythrina poeppigiana, Cecropia obtusifolia, Leucaena leucocephala; in the living fence rows, Cordia alliodora, Erythrina poeppigiana, Ocotea sinuata and Trophis racemosa; in the riparian forests, Coussapoa villosa, Cecropia obtusifolia, Hura crepitans, Pterocarpus officinalis and Spondias mombin; and in the pastures with dispersed trees, Cordia alliodora, Coussapoa villosa, Erythrina poeppigiana, Ocotea sinuata and Hura crepitans. This study demonstrates the importance of the cacao agroforest as well as arboreal elements in other land uses in providing resources for sloth conservation in a larger agricultural landscape.