AgentKit
DocsKitsCLI ReferenceDesktop App

CLI Reference

ak licenses

Query live AgentKit kit grants using the current local session and understand the shared whoami output contract.

Use ak licenses before installing a paid remote kit to confirm that the current account has an active grant.

Usage

ak licenses

The documented command has no positional arguments. The current implementation ignores extra positional tokens; do not rely on that behavior.

Options

FlagDefaultDescription
--registry-url <url>Environment or release defaultOverride the registry used for the entitlement request.

Shared output flags are described in CLI conventions. The command never prompts; --yes and --no-interactive do not alter it.

Before you run

ak licenses uses the same session and live entitlement query as ak whoami. It reads ~/.agentkit/auth/session.json unless AGENTKIT_HOME changes the base directory. The CLI slot is preferred over the App slot.

ak login --api-key ak_live_... --no-interactive
ak licenses

With no stored session, the command performs no network request, prints not logged in; run `ak login` to sign in, or `ak login --license-key <key>` for an AgentKit App license, and exits 1. With a stored session, it checks the session registry, requests current grants, and can rotate or re-mint an expired CLI credential once. A successful renewal rewrites the session file.

There is no offline grant cache and no entitlement mutation. This command reports grants; it does not activate, purchase, revoke, or install a kit.

Output and streams

Human stdout starts with [OK] logged in as <email>, followed by each kit (status) grant. When no email is known, the line names the sign-in method (logged in with a license key, logged in with an API key, or logged in by email); an empty grant list prints no licensed kits. The email falls back to the one recorded at sign-in. Despite the command's kit-focused help, it uses the same view model as ak whoami.

JSON also intentionally shares kind=auth.whoami rather than a distinct auth.licenses kind:

{
  "schema_version": 1,
  "kind": "auth.whoami",
  "data": {
    "authenticated": true,
    "email": "you@example.com",
    "authMethod": "api_key",
    "licenses": [
      {"kitId":"engineer","status":"active","grantType":"license","productId":"engineer"}
    ]
  }
}

With no stored session, --json prints the shared error envelope on stderr with auth.reason: "not_logged_in", error_code: "unknown", and exit_code: 1; stdout stays empty. Runtime, registry, and session errors use the same stderr envelope. With --json enabled, unknown or invalid flags use the shared JSON stderr error envelope (error_code: validation_failed, exit 2). Human mode, including --json=false, prints Usage.

Update windows

When the registry enforces update windows, each license also reports whether you can install new releases of that kit. Owned versions stay usable forever; the window only covers new releases.

Human output adds, per kit, the state, the date updates are covered through, the patch line, the latest covered version, the sources of the coverage, and a Renew updates link when a newer release needs renewal. With --json, each licenses[] entry gains an updates object, and data.updates.schemaVersion identifies the update-window payload version:

{
  "kitId": "engineer",
  "status": "active",
  "updates": {
    "state": "expired",
    "updatesThrough": "2026-01-31T00:00:00.000Z",
    "patchLine": "3.1",
    "latestEntitledVersion": "3.1.4",
    "entitlementSource": [{"type": "license", "status": "active"}],
    "renewUrl": "https://agentkit.best/account/updates"
  }
}

state is one of not_owned, unlimited, active, expired, or unknown. After an expired window, patches on the patchLine still install. The updates fields are absent when the registry does not enforce windows, so treat them as optional. They are informational: a cached copy never makes a newer version installable, and an ended window never disables an installed kit. See Update windows and renewal.

Exit status

ExitMeaningSafe next step
0The query completed for a signed-in session, including an empty grant list.Inspect the matching licenses[].kitId and status.
1No session is stored, the session store failed, registries mismatched, renewal failed, or the live grant request failed.Run ak login (or ak login --license-key <key>), or reauthenticate against the intended registry, then retry.
2A flag could not be parsed.Correct the invocation.

The command has no preview, apply, force, backup, or rollback. Credential renewal is its only possible local write.