HeadlinesBriefing favicon HeadlinesBriefing.com

Composing APIs and CLIs in the LLM Era

Hacker News: Front Page •
×

In early 2026, the tech industry is grappling with how to structure tool descriptions for LLMs (Large Language Models). One approach is to create fine-grained APIs that perform specific actions, like listing GitHub pull requests. Another method is to leverage existing CLIs (Command-Line Interfaces), allowing models to execute shell commands. The latter strategy is gaining traction because it enables the creation of tool pipelines, potentially saving on token cost and offering greater flexibility. These pipelines can be saved, customized, and executed by human operators, making the command line a versatile interface for both humans and machines.

The article discusses the advantages of using OpenAPI specs as programs, which can be interpreted by tools like Restish. This approach can eliminate the need for boilerplate code, as Restish acts as an interpreter for OpenAPI specifications. The author shares examples of giving an agent access to Google Docs and Google Groups, highlighting the challenges and solutions in using APIs and CLIs. The author also explores API authorization and secure token storage, providing practical insights into managing OAuth 2.0 flows with tools like oauth2c.

The article emphasizes the importance of adversarial interoperability when dealing with services that may not provide machine-readable API specs. By using existing tools and techniques, developers can create efficient and flexible solutions that reduce the need for bespoke code. This approach not only saves time and effort but also minimizes the surface area for future maintenance and bugs. The focus on command composition and the use of existing CLIs and APIs represent an innovative shift in how LLMs interact with tools and services.