I was recently researching google trends and keyword searches, you know... for fun. I discovered an overwhelming number of people are searching for species of fish which can peacefully cohabitate with betta fish. I wanted to spend some time addressing the issue of fish cohabitation and the biological rules that govern it, while also answering the question of which fish can live with your betta.
The short answer is two fold. First, you shouldn't add any other species at all if your betta's tank is too small (less than 10 gallons). 10-20 gallons for a betta aquarium is just enough space for their territory, and perhaps one or two additional low-key species. By low-key I mean non-active, but well protected species like some species of catfish. If your betta lives in a 30 gallon or larger tank, then you can start adding multiple additional species.
Second, bettas are active and curious fish who like to defend their territory. If your tank is large enough to prevent spatial aggression, you want to add fish with the opposite behavior and niche of your betta. By opposite niche I mean you want to add fish that occupy the space which the betta doesn't. This is easier said than done, as bettas explore quite actively. You want to add fish that are active when the betta is not. You want to add fish that move about the tank differently than the betta. By adding fish that behave differently or occupy a different niche than the betta, they will interact less and therefore experience less aggression toward one another.
Bettas are relatively slow moving fish. They can have quick bursts of speed as they rush toward food or a falling snail, but for the most part they glide through the aquarium as they explore every nook and cranny. In their natural environment, plant life creates a crowded habitat, so their fins did not evolve for speed or hydrodynamics. This natural adaption was compounded by years of artificial selection for larger and more flowing fins. As a result, bettas are relatively poor swimmers.
So when considering which species of fishes to add to a large enough betta aquarium, consider a small school of peaceful, fast-moving fish. By peaceful, in this case, I am referring to species that have a calm, purposeful, and tranquil swimming pattern, as opposed to darting back and forth quickly and erratically. Avoid overly active fishes like danios, mollies, or guppies. Instead, try to favor tetras or rasboras. A particular good choice are small rasboras like the harlequin rasbora, because as an Asian species, they prefer similar water parameters to the betta. In addition, some rasbora remain small, school well, are peaceful, and can swim away from an aggressive betta easily. Remember, bettas are carnivores and predators, mostly for insects and crustaceans, but the prey drive is still there.
Bettas are mostly diurnal. This means they are most active during the day. In an aquarium setting, your lights may turn off and the room lights stay on for a while. This would be similar to dawn or dusk, and your betta could still be semi-active. Animals active at dawn and dusk are crepuscular. To avoid aggression with a betta, you might consider adding fish that are crepuscular or nocturnal, when bettas are not very active. Most catfish, some plecostomus, and loach species are nocturnal and are most active after the aquarium lights are dimmed. Adding a red colored light to your tank will allow you to experience these night owls without disturbing sleeping residents, as most fish do not see the red wavelengths very well.
When choosing a cohabitant for your betta, you want to choose the species that are best suited to not be in your betta's focus. Faster-moving and active at different times are important, but you should avoid larger species too, like gourami, angelfish, rainbowfish, and larger tetras. At the same time, fish that are too small, like the celestial pearl danio, can constantly trigger your betta's prey drive.
I should also note the phenomenon of safety in numbers. With smaller species of fishes that experience predation from other species in the wild, it is important for their sense of security and comfort, and therefore activity in the aquarium, to see other species of fish are present and moving about. If your tank is larger than 30 gallons and you have just one betta, it may avoid coming out at all due to fear of a predator being nearby because of the dramatic lack of activity. Anecdotally, I've seen bettas show this behavior in large tanks, while others act like they own the place.
Some people have had success with some of the species I suggested to avoid, and have had trouble with species I recommended. In the end, the key is to ask yourself whether or not you think additional fish will benefit your betta, aquarium, and thus your enjoyment of them.
Here is a list of species I've had success cohabitating with bettas.
Von Rio tetra