The science fiction book I read around 2008 seemed to be the second book of a trilogy. The story was not set on Earth. There were humanoid intelligent beings, ruins of dead civilization, ancient robots, ministries, war with heretics.
The protagonist was the lone representation of a faction or species called Builders. He traveled with a female bodyguard, and could control ancient machines, small and giant.
At the end of the book he gets kidnapped by someone who wants to join the heretics.