The initial Barbary States fleets usually die off in the beginning of the game. Once they do, they seem to rebuild their fleets but keep them in port unless they have a juicy target available. I have never seen them raiding a trade route, but that could be because every time they do the Med fleets drive them off. They have attacked me when I tried to send a single ship nearby, though.