Skip to main content

Agent Commands

The agents command (alias: a) manages enrolled security agents across your fleet. Agents are the endpoint software that executes security tests and reports results.

achilles agents <subcommand> [flags]

Subcommands​

SubcommandDescription
listList agents with optional filters
showShow detailed info for a specific agent
updateUpdate agent status
deleteDecommission an agent
rotate-keyRotate an agent's API key
heartbeatsShow heartbeat history
eventsShow agent event log
metricsFleet metrics and health summary

agents list​

List enrolled agents with filtering and pagination.

achilles agents list [flags]

Flags:

FlagTypeChoicesDescription
--statusstringactive, disabled, decommissioned, online, offline, staleFilter by status
--osstringwindows, linux, darwinFilter by operating system
--tagstringFilter by tag
--hostnamestringFilter by hostname
--online-onlybooleanShow only online agents
--stale-onlybooleanShow only stale agents
--limitnumberMax results (default: 50)
--offsetnumberOffset for pagination (default: 0)

Examples:

# List all agents
achilles agents list

# Show only Windows agents that are online
achilles agents list --os windows --online-only

# Find stale agents (missed heartbeats)
achilles agents list --stale-only

# Filter by tag
achilles agents list --tag production

# Paginate through results
achilles agents list --limit 10 --offset 20

# JSON output for scripting
achilles agents list --json

Example output:

ID Hostname OS Arch Version Status Last Seen Tags
───────── ──────────────────── ──────── ────── ──────── ──────────── ──────────── ──────────
a1b2c3d4… prod-web-01 windows amd64 0.7.4 ● active 2m ago production
e5f6g7h8… dev-db-03 linux amd64 0.7.3 ○ active 4h ago dev, staging
i9j0k1l2… staging-api-02 darwin arm64 0.7.4 ○ disabled 6h ago staging

Showing 3 of 3 agents

The dot before the status shows whether the agent is online (●) or offline (○). You only see agents of your own organization.

agents show​

Display detailed information about a specific agent.

achilles agents show <id>

Example:

achilles agents show a1b2c3d4-5678-9abc-def0-123456789abc

Output includes: ID, hostname, OS, architecture, agent version, status, last heartbeat, enrollment date, enrolled by, tags, key rotation status, and timestamps.

agents update​

Update an agent's administrative status.

achilles agents update <id> --status <active|disabled>

Flags:

FlagTypeChoicesDescription
--statusstringactive, disabledNew status

Example:

# Disable an agent (stops task assignment)
achilles agents update a1b2c3d4 --status disabled

# Re-enable an agent
achilles agents update a1b2c3d4 --status active

agents delete​

Decommission an agent. This is a soft-delete -- the agent record is preserved but marked as decommissioned.

achilles agents delete <id>
warning

Decommissioning is irreversible from the CLI. The agent will stop receiving tasks and its status changes to decommissioned.

Example:

achilles agents delete a1b2c3d4-5678-9abc-def0-123456789abc

agents rotate-key​

Rotate the API authentication key for an agent. The agent picks up the new key on its next heartbeat.

achilles agents rotate-key <id>

Example:

achilles agents rotate-key a1b2c3d4
✓ Key rotated for agent a1b2c3d4
⚠ The agent will pick up the new key on next heartbeat

agents heartbeats​

View heartbeat telemetry history for an agent, including CPU usage, memory, and disk metrics.

achilles agents heartbeats <id> [flags]

Flags:

FlagTypeDefaultDescription
--daysnumber7Number of days of history (1-30)

Example:

# Last 7 days (default)
achilles agents heartbeats a1b2c3d4

# Last 30 days
achilles agents heartbeats a1b2c3d4 --days 30

Example output:

Time CPU % Mem MB Disk MB
──────────────────── ─────── ──────── ────────
2026-03-19 14:00:00 12.3 4096 51200
2026-03-19 13:00:00 15.1 4120 51180
2026-03-19 12:00:00 8.7 3980 51200

agents events​

View the event log for an agent (enrollment, status changes, task completions, etc.).

achilles agents events <id> [flags]

Flags:

FlagTypeDefaultDescription
--typestringFilter by event type
--limitnumber20Max results

Example:

# All recent events
achilles agents events a1b2c3d4

# Filter by event type
achilles agents events a1b2c3d4 --type task_completed

agents metrics​

Display fleet-wide metrics and health KPIs.

achilles agents metrics

This combines two API calls to show:

  • Fleet metrics: Total agents, online/offline/stale counts, breakdown by OS
  • Health KPIs: Fleet uptime (30-day), task success rate (7-day), MTBF (mean time between failures), stale agent count

Example output:

total: 24
online: 21
offline: 3
by_os: {"windows": 18, "linux": 4, "darwin": 2}
fleet_uptime_30d: 98.7%
task_success_rate_7d: 94.2%
mtbf_hours: 168
stale_agents: 1

Enrollment Tokens​

achilles tokens <subcommand> [flags]
SubcommandDescription
createCreate an enrollment token
listList active enrollment tokens
revoke <id>Revoke a token

Flags for create:

FlagTypeDefaultDescription
--ttl-hoursnumber24Token lifetime in hours (1 to 720)
--max-usesnumber1How many agents may enroll with it (1 to 1000)
--metadatastringJSON object stored with the token, e.g. '{"env":"prod"}'
achilles tokens create --ttl-hours 48 --max-uses 10

The token is created for the organization of your CLI session, and agents that enroll with it join that organization. The full token value is shown once, in the create output; list shows only its first 8 characters.

Agent Versions​

achilles versions <subcommand> [flags]
SubcommandDescription
listList registered agent versions (version, OS, arch, size, signed, mandatory)
uploadUpload an agent binary
buildBuild an agent binary from source on the server
delete <version> <os> <arch>Delete a registered binary

Flags for upload:

FlagTypeRequiredDescription
--versionstringYesVersion string. It must equal the version stamped into the binary
--osstringYeswindows, linux or darwin
--archstringYesamd64 or arm64
--filestringYesPath to the binary
--notesstringNoRelease notes
--mandatorybooleanNoMark as a mandatory update

build takes --version, --os and --arch (all required).

achilles versions upload --version=0.7.4 --os windows --arch amd64 \
--file ./achilles-agent-windows-amd64.exe
achilles versions build --version=0.7.4 --os linux --arch amd64
Write --version=<value>

A bare --version is the global flag that prints the CLI version, so --version 0.7.4 (with a space) prints the CLI version and does nothing else. Use the = form here.

The version must match the binary

The server reads the version built into the binary and refuses the registration (HTTP 422) when it differs from --version, or when the binary has no version stamp. A mislabelled binary would make agents install it, restart reporting the old version, and install it again in a loop. See Self-Updates.