Earlier this year we had a discussion on beans fixing nitrogen from the air. That happens because a certain bacteria forms nodules on the plant roots. I checked some bean plant roots at different times this year and did not find any nodules, so next year I'll inoculate my beans with an inoculant to make sure that bacteria is in the soil. The way I understand it I just need to do that once and the bacteria will then be in my soil, but reading a different article, you need to have organic matter in your soil to keep the bacteria alive. I think most of us will meet that criteria.
I found an interesting article about that from New Mexico State.
http://aces.nmsu.edu/pubs/_a/A129/
A few highlights I got from this article. Some plants will fix enough nitrogen to meet the plant's nitrogen needs but beans do not. Beans will use all the nitrogen these nodules produce but they also need some more. Beans do better with these nodules even if there is plenty of other nitrogen available in the soil so it's good to have these microbes present. But when you remove the beans and bean plants above the soil, there is less nitrogen in the soil than when the season started unless you add nitrogen. That's not true with some other legumes. Some do fix excess nitrogen, like field peas. Excess nitrogen in the soil will inhibit the growth of this bacteria. Too much acidity will too.
If you grow beans in a container you might want to consider using an inoculant.
There are different inoculants for different plants. You want one specifically for what you are planting. Soybeans use a different inoculant than beans or green peas.
Looking online it's not cheap but a little goes a long way. It normally comes in powder form, a recommended method is to mix a little powder with your beans just before you plant them. It's a biological so it has a shelf life, but the one I looked at was good for a year. You probably want to store it where it doesn't get too hot like BT and other biologicals.
I thought this was a relevant topic for this thread, especially since we discussed it earlier. I'd assumed that bacteria was in my soil since I' been growing beans for so long. Shows what happens when you assume. But the big surprise to me was that the net amount of useable nitrogen does not increase if you plant beans if you remove the beans and the plants instead of reincorporating the plant material into the soil. I thought all legumes incorporated extra nitrogen. Some do, some don't.