Well, if you have constructions and designs set to automated and your spaceports have a standard design(ex: LSP-41,MSP-23,SSP-22) then the AI will upgrade these spaceports periodically to the latest tech. At least that's how it works for my standard spaceports. The custom designed ones however I have to upgrade myself. The AI just works at a slower pace, but not slower than the other empires, so you know. Same applies for ships. Most of my standard design ships are constantly( at least every year) upgraded to the latest design.