Traditionally APIs were designed for a browser or a client library. Something on the other end was going to parse the response and turn it into a screen or an object. However, the thing calling your API now is a model in a loop, with a token budget and a terminal, and it does not render your JS...
Source: [Dev.to](https://dev.to/pdparchitect/how-to-build-for-ai-agents-35f)