Some time last year, I wrote an essay discussing why giving software agents status as a legal person would be inevitable. And look: we now have the first software agent with status as a legal person: Sophia.
Yes, I agree: in some aspects, our legal framework is not quite ready to handle artificially created entities as legal persons. But in many ways, we already are: a company is nothing other than a legal person, whose actions are dependent on one or more natural persons who are responsible for authorizing decisions for that legal person. A software agent – and by extension, Sophia – would be rather similar: while she can make a lot of decisions on her own, certain decisions which she cannot make on her own – perhaps figuring out what a lawsuit actually means – may need to be made by her legal authorized representative (you can think of that as her 'parent' or 'guardian').
At any rate, it will be fun to watch lawsuits play out in clearing up how the law deals with artificial entities as legal persons!