They can be kept. But you must make sure of a few things.
1) No predators, not even small crabs.
2) Filter intakes. Screen these if the suction is too strong. So far they have not ventured into my hang-on filters. My filters only draw 300L/hr so maybe that's why.
3) No bigger fish which will compete with them for food or stress them out.
4) Feed frequently with appropriately sized foods. Always start with live baby brine shrimp. These must be enriched with HUFA supplements, NHBBS will not do in the long run.
5) A small night light preferably as sudden darkness seems to spook these timid fish.