Agent2API.
Call local agents from the APIs you already know.
Agent2API draws a clear API boundary between local AI agent CLIs and the applications that call them. It accepts HTTP requests and delegates execution to headless_core.
What problem does it solve?
I wanted to run authenticated local agent CLIs through the same interface existing LLM SDKs already use. The design separates the API from the execution backend.
What I chose, and how I built it.
Use existing SDKs
Implements OpenAI-compatible endpoints, among others.
Separate the API from agent execution
Dependencies between the transport layer, core, and backend are deliberately organized.
Don't reimplement CLI auth
Uses CLIs already installed and authenticated in the local environment.
Pin the execution environment
Settings like the working directory live on the server and can't be changed directly by API requests.
The big picture.
For technical details, the README and source code in the public repository are the primary source.
Read the README and code on GitHub ↗Status and caveats.
According to the README, the npm package hasn't been published yet. Local CLI setup is required. Make sure you understand how paths, permissions, and logs are handled before using it.
Want to try it?
This page is an introduction. Installation steps, requirements, license, and the latest status are in the public repository.
Check out Agent2API on GitHub ↗