they can usually go well with top dwelling fish that stay on the top all the time like an African butterfly fish just not fish that stay on the top all day and sleep on the bottom like Platies.
A 40 gallon is fine. Why not just keep it alone, they get big, then you don't have to worry about aggression. Just keep it as a species tank. Just a suggestion. They are very aggressive and it would be a battle keeping them with cichlids. Both ways. They are also climbers, so make sure you have a full hood.