← Back to context

Comment by wonderfuly

3 hours ago

Why cli instead of just HTTP API doc? The agent can use curl or write code to send requests.

They already have a HTTP API, but the real reason is that CLIs are emerging as the most ergonomic way for the current wave of AI agents to do stuff. There's a few benefits over APIs:

- No need to worry about transport layer stuff at all, including auth or headers. This is baked in, so saves context.

- They are self describing with --help and then nested --help commands, way better than trying to decipher an OpenAPI spec. You usually don't even need an agent skill, just call the --help and the LLM figures it out.

CLI is probably more reliable. Also, the ergonomics for the person setting up the machine for the AI are better. They can check to see if the command is working without screwing with curl. It's also possible a human might want to use the software / service they're paying for.

  • Why is it more reliable? The human usage point is fair, but I doubt how long it is still necesary.

A CLI runs on the client, so they can embed client-side functionality like telemetry or caching.

if nothing else the cli gives very easy access to the HTTP api docs via `gws schema`

i’d rather not waste the context tokens re implementing their cli from scratch, if indeed it does a good job.