smallnest/agent-wrapper — explained in plain English
Analysis updated 2026-05-18
Build a Go application that can call any supported coding-agent CLI through one shared API
Stream text, tool calls, and turn events from an agent CLI subprocess
Manage multi-turn sessions with approval workflows and token budgets across different agent providers
| smallnest/agent-wrapper | shieldnet-360/prompt-gate | tatanakots/fuckprivateclient | |
|---|---|---|---|
| Stars | 28 | 28 | 28 |
| Language | Go | Go | Go |
| Setup difficulty | — | — | moderate |
| Complexity | — | — | 4/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
agent-wrapper is a Go library that provides a single unified programming interface for driving multiple AI coding agent command-line tools. The README is written in Chinese. The problem it addresses is that each coding agent CLI, such as Claude Code, Cursor Agent, Kimi Code, Codex, Pi Agent, and OpenCode, has its own protocol, authentication approach, and output format. This library wraps each one so that your own Go code only needs to interact with one consistent interface regardless of which agent is running underneath. The core abstraction is an Agent interface backed by a subprocess. When you run a prompt, the library launches the relevant CLI tool as a child process, reads its output stream, and delivers events through a Go channel. Events cover text output, tool calls, tool results, turn boundaries, and errors. There is also a synchronous API that collects all events and returns a single result object when the agent finishes. The orchestrator layer adds multi-turn conversation management, approval workflows (where your code can decide whether to allow a specific tool call), token budget limits, and context compression for long sessions. Sessions can be resumed across separate program runs using a session ID. The library covers eight providers at the time of the README: Claude Code, Cursor Agent, Kimi Code, Antigravity, Codex, Pi Agent, OpenCode, and an ACP-protocol provider. A command-line tool is also included for running any supported agent from a terminal with options for streaming output, JSON output, and session resumption. The README includes a section explaining why the library drives CLI subprocesses directly rather than using the ACP protocol standard, noting that the CLI tools expose more functionality than ACP server implementations typically surface. The project is MIT licensed.
A Go library that gives you one consistent interface for driving Claude Code, Cursor, Codex, and other coding-agent CLIs from your own programs.
Mainly Go. The stack also includes Go.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.