Are you assuming AI will run things better than humans? I am not sure it will.
On direct democracy, I'm probably too lazy to wish to spend all of my time thinking about which policies will work best on every topic. Also, not smart enough to know what is the best answer for every situation. So for me, having representatives and the people who work for them is a relief.
But there are some subjects that referenda might work well for. Maybe if you had a referendum on abortions, that might be the sort of thing which could be resolved by popular will.