Examples
There is one Go SDK: github.com/AdminTurnedDevOps/ABox/pkg/abox. Open a session, then call methods on it — Turn, RunCommand, ListFiles, cancel via context, SetApprover, and so on. You do not add a package per feature.
go get github.com/AdminTurnedDevOps/ABox@latest
import "github.com/AdminTurnedDevOps/ABox/pkg/abox"
sess, err := abox.Open(ctx, abox.Options{})
// sess.Turn(...)
// sess.SetApprover(...)
// sess.RunCommand(ctx, "uname -a", 15)
// sess.ListFiles(ctx, ".", 4, 50)
Each child page has the matching abox CLI (or config.yaml) and a sample main that calls one SDK method. Copy the Go into your program. abox-vmm must be on PATH (the current runnable release path is darwin_arm64; Linux release support remains gated) from the GitHub release. Golden image and provider key: Quickstart. Probe methods do not need a key. A successful Open speaks protocol 4.
The CLI is abox, abox --resume <id>, abox --model, abox --probe-vm, abox exec --prompt, abox mcp add / mcp login, and abox creds migrate. There are no extra flags for ReadFile, RunCommand, ExportPatch, MaxTurns, or live SetMCPTokens — those stay on the SDK page as SDK-only. Full command list: CLI and TUI.
| Call | Sample | CLI |
|---|---|---|
Open + Turn | Basic turn | abox, abox exec --prompt |
Resume | Resume | abox --resume <id> |
Turn + canceled ctx | Cancel | Ctrl+C |
TurnOpts | Turn options | SDK-only (MaxTurns / Timeout) |
ListFiles | List files | abox --probe-vm |
ReadFile | Read file | SDK-only |
RunCommand | Run command | SDK-only |
SetApprover | Approvals | TUI prompt; exec denies |
ExportPatch | Export patch | SDK-only |
SetModel | Set model | abox --model |
Turn events | Print events | abox exec --prompt |
Capabilities | Capabilities | protocol 4 required |
Options | Custom VM | ~/.abox/config.yaml |
ErrGuestTooOld | Errors | abox --resume <id> of an old disk |
History | History | abox --resume <id> |
Turn twice | Multi-turn | abox (TUI) |
SetMCPTokens | MCP tokens | abox mcp add / mcp login |