This gave me a crazy epiphany. It's REST for AI.
Not fake REST, but real REST, where you call an endpoint and it returns information about a thing and instructions for what else you can do with that thing.
If you get a list of orders, you can ask for more information about one, and that information also tells you what else you can do, like cancel it, change shipping, request status, etc.
We hear about REST, but I don't think most of us have ever actually implemented or used it. I haven't. We think anything with HTTP verbs is REST.
One of the premises of REST is that given no knowledge of what operations are available, you can generate a UI in real time based on the result of a single request.
I'm sure someone, somewhere does that. I've never seen it. It's not how we write code. But maybe it makes sense as a way for agents to interact with systems.
I have to process this.
I find generated UI plausible. It works well if software is generated around use cases, as in hexagonal/ports-and-adapters or clean architecture (which are about that, not excessive levels of abstraction, as some claim.)
That already makes UIs easier to create. Too much software exposes state changes.
> Call this API endpoint to update the OrderStatus property to "Cancelled", or to set any random set of properties you want. We'll do our best to figure out what it means.
It should be
> You can cancel an order. Call this to cancel the order.
That UI is easy to generate. Maybe it doesn't need a UI.