AgentKit
ReferenceCLI commands
BetaYou are reading docs for the beta channel (2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →

CLI commands

ak agents remove

Remove an installed agent

Delete a agent's installed files; if the asset has a runtime env and skill runtime is not opted out, the env is also cleaned up. Idempotent - removing an absent ref reports an info notice and exits 0.

Who it's for: Both: scripted CI cleanup (--json) and users undoing an install.

When to use it: To uninstall a previously installed agent.

What changes on disk: Removes files under ~/.claude/plugins/<kit>/agents/<name>/. Unless AGENTKIT_SKILL_RUNTIME=0, also removes ~/.agentkit/skills/<kit>/<name>/.

Usage

ak agents remove <kit>/<agent> [flags]

Examples

ak agents remove engineer/agent-browser
ak agents remove engineer/agent-browser --json

Flags

FlagDescription
-h, --helphelp for remove
--jsonEmit machine-readable JSON (implies --no-interactive)
--no-interactiveDisable interactive prompts (CI-safe)
-q, --quietSuppress non-error output on stderr
-V, --verboseExtra diagnostic output on stderr (loses to --quiet)
-y, --yesAssume yes for all prompts

Output modes

ModeBehavior
prettydefault on TTY (colors, ASCII markers)
plainauto when stdout piped or --no-interactive
json--json (single-object envelope, NDJSON-safe)

Exit codes

CodeMeaning
0success
1runtime error
2invalid flags
3user-cancel (SIGINT, prompt-cancel)
  • ak agents — Per-agent management commands

On this page