You confuse automation and AI. AI worth that name might never happen, as it is not even on the distant horizon (i.e. there are not even credible theories how it could be implemented at this time). Automation is limited in what it can do. In particular, excluding brute-force effects, automation can generally only do less than its creators as it has no understanding of what it does. That does not make it useless, but the, say, 10% of all jobs that require the highest level of understanding and insight are completely inaccessible to automation. That is not really an issue, as many of the people doing these jobs would do them for free, if cost-of-living was provided to everybody. But for the average person, there will soon mostly only be jobs left that require a person to do it, because it is a service rendered to other persons. This includes things like teaching things people do for fun (where teaching is required, e.g. private piloting), and things like waitressing or cooking. These jobs will however not be enough to give everybody a job and most certainly will be unsuitable as way to distribute wealth. The other challenge will be what people that currently fall back to watching TV and drinking when they have free time will do with their lives. You can only drink and watch TV so much before it becomes problematic.