This is essentially what Shopify did with River (https://shopify.engineering/under-the-river), and we built out something similar at our company.

I'm sure the labs are working on this sort of thing - Managed Agents are probably the closest?