The point of UBI or other welfare systems is for people we don't /want/ working, children and the elderly.
It's impossible to run out of work for people who are capable of it. As an example, if you have two people and a piece of paper, just tear up the paper into strips, call them money and start exchanging them. Congrats, you both have income now.
(This is assuming the AGI has solved the problem of food and stuff, otherwise they're going to have to trade for that and may run out of currency.)
Half-joking. In seriousness, something like a UBI will most likely happen.