An intelligent swarm of Markovian Agents