The viruses are not intelligent but they do contain algorithms. Upon detecting certain proteins they link into a cell's DNA and begin reprogramming that species' development.
To manipulate a genome for their purpose takes many millennia, but the viruses don't care. They have no sense of time. Their internal instructions guide the target species to become more intelligent.
Viral directed evolution created the species named Homo Sapient. We conquered our world and then we learned to travel through space. It's when humanity colonized another star system that we finally achieved the biological destiny created for us by our viral masters.