Skip to content

Library

Last updated: 2026-06-27

microagent is a Go library with a CLI on top. If you are building an agent runtime, scheduler, local developer tool, or backend service, import the Go packages instead of spawning the CLI.

The packages own lifecycle, rootfs builds, kernel management, image records, diagnostics, and performance measurement. The CLI is useful for humans and scripts, but it calls the same packages your Go program can import. The MCP endpoint follows the same rule: it adapts the package APIs for agent clients. Orchestration, policy, planning, and LLM behavior stay with the caller; see Boundaries for the line microagent does not cross.

PackageUse it for
pkg/workspaceCreate, run, start, inspect, stop, delete, clone, copy files, read logs, collect results, and supervise workspaces.
pkg/rootfsConverting OCI images and tar bundles into ext4 rootfs disks.
pkg/kernelInstalling and verifying default backend kernels.
pkg/imagecachePulling, tagging, listing, removing, and pruning reusable local rootfs baselines.
pkg/diagnosticsCheck whether the current host can boot a VM.
pkg/perfMeasuring boot, footprint, and steady-state VM performance.
pkg/vmkitShared request/response types and supervisor clients.

Use the CLI when you want an operator-facing command, a shell script, or a quick one-shot run. Use the Go library when microVM lifecycle is part of your program’s control flow and you want typed options, typed responses, and direct error handling.