Skip to content

Commands & Config

The Breeze agent supports 60+ commands organized into 17 categories. Commands are sent from the API to agents over WebSocket, each with an action string and an optional JSON payload.

Command Flow

Dashboard → POST /devices/:id/commands
→ BullMQ job created
→ WebSocket message sent to agent
→ Agent executes command
→ Agent sends result via WebSocket
→ Result stored in database
→ Dashboard receives real-time update

Commands with a term- prefix bypass the database queue and are sent directly over WebSocket for real-time terminal sessions.

Command Result Format

Every command returns a standard result envelope:

FieldTypeDescription
statusstringcompleted, failed, or timeout
exitCodeintExit code (0 for success)
stdoutstringJSON-encoded result data or script output
stderrstringError output (scripts only)
errorstringError message when status is failed
durationMsint64Execution time in milliseconds

Process Management

Enumerate, inspect, and terminate running processes. Cross-platform (Windows, macOS, Linux).

ActionDescriptionKey Payload Fields
list_processesList running processes (paginated)page, limit, search, sortBy, sortDesc
get_processGet details for a specific processpid (required)
kill_processTerminate a process by PIDpid (required), force

list_processes

ParamTypeDefaultDescription
pageint1Page number
limitint50Results per page (max 500)
searchstring""Filter by name, user, command line, or PID
sortBystring"cpu"Sort field: cpu, memory, pid, name, user
sortDescbooltrueSort descending

Returns ProcessListResponse with processes[], total, page, limit, totalPages.

get_process

ParamTypeRequiredDescription
pidintYesProcess ID to inspect

Returns a single ProcessInfo object with pid, name, user, cpuPercent, memoryMb, status, commandLine, parentPid, threads, createTime.

kill_process

ParamTypeDefaultDescription
pidintRequiredProcess ID to terminate
forceboolfalseIf true, sends SIGKILL instead of SIGTERM

Service Management

List, inspect, start, stop, and restart system services. Platform-aware: uses systemd on Linux, launchd on macOS, and the Windows Service Control Manager.

ActionDescriptionKey Payload Fields
list_servicesList system services (paginated)page, limit, search, status
get_serviceGet details for a specific servicename (required)
start_serviceStart a stopped servicename (required)
stop_serviceStop a running servicename (required)
restart_serviceRestart a servicename (required)

list_services

ParamTypeDefaultDescription
pageint1Page number
limitint50Results per page (max 500)
searchstring""Filter by service name
statusstring""Filter by status (e.g. Running, Stopped)

Returns ServiceListResponse with services[], each containing name, displayName, status, startupType, account, path, description.

get_service / start_service / stop_service / restart_service

ParamTypeRequiredDescription
namestringYesService name (e.g. sshd, nginx, wuauserv)

Event Logs (Windows)

Query Windows Event Logs. Returns stub responses on non-Windows platforms.

ActionDescriptionKey Payload Fields
event_logs_listList available event logs
event_logs_queryQuery events from a loglogName, level, source, eventId, page, limit
event_log_getGet a specific log entrylogName, recordId

event_logs_query

ParamTypeDefaultDescription
logNamestring"System"Log name (System, Application, Security, etc.)
levelstring""Filter: Information, Warning, Error, Critical
sourcestring""Filter by event source
eventIdint0Filter by event ID
pageint1Page number
limitint50Results per page (max 500)

event_log_get

ParamTypeDefaultDescription
logNamestring"System"Log name
recordIdint0Record ID of the entry

Scheduled Tasks (Windows)

Manage Windows Task Scheduler tasks. Returns stub responses on non-Windows platforms.

ActionDescriptionKey Payload Fields
tasks_listList scheduled tasks (paginated)folder, search, page, limit
task_getGet details for a specific taskpath
task_runTrigger a task to run immediatelypath
task_enableEnable a disabled taskpath
task_disableDisable a taskpath
task_historyGet execution history for a taskpath, limit

tasks_list

ParamTypeDefaultDescription
folderstring"\"Task Scheduler folder to list
searchstring""Filter by task name
pageint1Page number
limitint50Results per page (max 500)

task_get / task_run / task_enable / task_disable

ParamTypeRequiredDescription
pathstringYesFull task path (e.g. \Microsoft\Windows\UpdateOrchestrator\Schedule Scan)

task_history

ParamTypeDefaultDescription
pathstringRequiredFull task path
limitint50Max entries to return (1-200)

Registry (Windows)

Read and write Windows Registry keys and values. Returns error stubs on non-Windows platforms.

ActionDescriptionKey Payload Fields
registry_keysList subkeys at a registry pathhive, path
registry_valuesList values at a registry pathhive, path
registry_getGet a specific registry valuehive, path, name
registry_setSet a registry valuehive, path, name, type, data
registry_deleteDelete a registry valuehive, path, name
registry_key_createCreate a new registry keyhive, path
registry_key_deleteDelete a registry keyhive, path

Common Parameters

ParamTypeDefaultDescription
hivestring"HKLM"Registry hive: HKLM, HKCU, HKCR, HKU, HKCC
pathstring""Registry key path (e.g. SOFTWARE\Microsoft\Windows\CurrentVersion)

registry_get

ParamTypeDefaultDescription
hivestring"HKLM"Registry hive
pathstring""Key path
namestring""Value name

registry_set

ParamTypeDefaultDescription
hivestring"HKLM"Registry hive
pathstring""Key path
namestring""Value name
typestring"REG_SZ"Value type: REG_SZ, REG_DWORD, REG_BINARY, REG_EXPAND_SZ, REG_MULTI_SZ, REG_QWORD
datastring""Value data

registry_delete

ParamTypeDefaultDescription
hivestring"HKLM"Registry hive
pathstring""Key path
namestring""Value name to delete

System

Power management and session locking. Cross-platform.

ActionDescriptionKey Payload Fields
rebootSchedule a system rebootdelay
shutdownSchedule a system shutdowndelay
lockLock the current user session

reboot / shutdown

ParamTypeDefaultDescription
delayint0Delay in minutes before executing (0-1440, i.e. max 24 hours)

Platform behavior:

  • Windows: Runs shutdown /r /t <seconds> (reboot) or shutdown /s /t <seconds> (shutdown)
  • Linux/macOS: Runs shutdown -r +<minutes> (reboot) or shutdown -h +<minutes> (shutdown)

lock

No payload parameters. Locks the active session:

  • Windows: rundll32.exe user32.dll,LockWorkStation
  • macOS: CGSession -suspend
  • Linux: loginctl lock-session (falls back to dm-tool lock)

File Operations

Browse, read, write, and manage files on the agent filesystem. All paths are cleaned and normalized. Mutating operations are blocked on critical system paths (/, /boot, /proc, /sys, /dev, /bin, /sbin, /usr).

ActionDescriptionKey Payload Fields
file_listList directory contentspath
file_readRead file contentspath, encoding
file_writeWrite content to a filepath, content, encoding
file_deleteDelete a file or directorypath, recursive
file_mkdirCreate a directorypath
file_renameRename or move a fileoldPath, newPath
filesystem_analysisDeep filesystem analysispath, scanMode, maxDepth, topFiles, topDirs, timeoutSeconds

file_list

ParamTypeDefaultDescription
pathstringUser home dirDirectory to list

Returns FileListResponse with entries[], each containing name, path, type (file/directory), size, modified, permissions.

file_read

ParamTypeDefaultDescription
pathstringRequiredFile path to read
encodingstring"text""text" for UTF-8, "base64" for binary

file_write

ParamTypeDefaultDescription
pathstringRequiredFile path to write
contentstring""File content
encodingstring"text""text" or "base64"

Parent directories are created automatically. Files are written with 0644 permissions.

file_delete

ParamTypeDefaultDescription
pathstringRequiredFile or directory path
recursiveboolfalseIf true, removes directories and all contents. Recursive deletes are blocked on top-level paths (e.g. /home, /var).

file_mkdir

ParamTypeRequiredDescription
pathstringYesDirectory path to create (with parents)

file_rename

ParamTypeRequiredDescription
oldPathstringYesSource path
newPathstringYesDestination path

filesystem_analysis

Deep filesystem scan that identifies large files, large directories, duplicate candidates, temp/cache accumulation, old downloads, unrotated logs, trash usage, and safe cleanup candidates.

ParamTypeDefaultDescription
pathstringRequiredRoot directory to analyze
scanModestring"baseline""baseline" (deep) or "incremental" (targeted)
maxDepthint32 (baseline) / 12 (incremental)Max directory depth (1-64)
topFilesint50Number of largest files to return (1-500)
topDirsint30Number of largest directories to return (1-200)
maxEntriesint10,000,000Max filesystem entries to scan (1,000-25,000,000)
timeoutSecondsint20Scan timeout (5-900 seconds)
followSymlinksboolfalseFollow symbolic links
workersintautoParallel scan workers (1-32; auto-scaled to CPU count)
targetDirectoriesstring[]Specific directories for incremental scans
checkpointobjectResume a previously interrupted scan

The response includes topLargestFiles, topLargestDirectories, tempAccumulation, oldDownloads, unrotatedLogs, trashUsage, duplicateCandidates, cleanupCandidates, and a summary with scan statistics. If the scan is interrupted (timeout or max entries), partial: true is set along with a checkpoint that can be passed to resume.


Terminal

Open interactive remote terminal (PTY) sessions. Terminal commands use the term- prefix for command IDs and bypass the database queue for low-latency communication.

ActionDescriptionKey Payload Fields
terminal_startOpen a new terminal sessionsessionId, cols, rows, shell
terminal_dataSend input data to a sessionsessionId, data
terminal_resizeResize a terminal sessionsessionId, cols, rows
terminal_stopClose and destroy a sessionsessionId

terminal_start

ParamTypeDefaultDescription
sessionIdstringRequiredUnique session identifier
colsint80Terminal column count
rowsint24Terminal row count
shellstring""Shell to launch (empty = system default)

terminal_data

ParamTypeRequiredDescription
sessionIdstringYesSession to write to
datastringYesInput data (keystrokes, paste content)

terminal_resize

ParamTypeDefaultDescription
sessionIdstringRequiredSession to resize
colsint80New column count
rowsint24New row count

terminal_stop

ParamTypeRequiredDescription
sessionIdstringYesSession to close

Remote Desktop

Two remote desktop modes are available: WebRTC-based (legacy) and WebSocket-based streaming.

WebRTC (Legacy)

ActionDescriptionKey Payload Fields
start_desktopStart a WebRTC desktop sessionsessionId, offer, iceServers
stop_desktopStop a WebRTC desktop sessionsessionId

start_desktop

ParamTypeRequiredDescription
sessionIdstringYesUnique session identifier
offerstringYesWebRTC SDP offer
iceServersarrayNoArray of { urls, username, credential } ICE server configs

Returns { sessionId, answer } where answer is the WebRTC SDP answer.

WebSocket Streaming

ActionDescriptionKey Payload Fields
desktop_stream_startStart a desktop frame streamsessionId, quality, scaleFactor, maxFps
desktop_stream_stopStop a desktop frame streamsessionId
desktop_inputSend mouse/keyboard inputsessionId, event
desktop_configUpdate streaming configurationsessionId, quality, scaleFactor, maxFps

desktop_stream_start

ParamTypeDefaultDescription
sessionIdstringRequiredUnique session identifier
qualityintDefault configJPEG quality 1-100
scaleFactorfloatDefault configImage scale factor 0.0-1.0
maxFpsintDefault configMaximum frames per second 1-30

Returns { sessionId, screenWidth, screenHeight }.

desktop_input

ParamTypeRequiredDescription
sessionIdstringYesSession to send input to
eventobjectYesInput event object (see below)

The event object fields:

FieldTypeDescription
typestringRequired. Event type: mousemove, mousedown, mouseup, click, dblclick, keydown, keyup, scroll
xintMouse X coordinate
yintMouse Y coordinate
buttonstringMouse button: left, right, middle
keystringKey name for keyboard events
deltaintScroll delta
modifiersstring[]Modifier keys: ctrl, alt, shift, meta

desktop_config

ParamTypeRangeDescription
sessionIdstringRequiredSession to update
qualityint1-100JPEG quality
scaleFactorfloat0.0-1.0Image scale factor
maxFpsint1-30Maximum frames per second

At least one of quality, scaleFactor, or maxFps must be provided.


Script Execution

Execute scripts on managed devices. Supports Bash, PowerShell, Python, and other interpreters. Both script and run_script invoke the same handler.

ActionDescriptionKey Payload Fields
script / run_scriptExecute a scriptcontent, language, timeoutSeconds, runAs, parameters
script_cancelCancel a running scriptexecutionId
script_list_runningList currently running scripts

script / run_script

ParamTypeDefaultDescription
contentstringRequiredScript source code
languagestring"bash"Script type: bash, powershell, python, cmd, etc.
scriptIdstring""Reference ID for tracking
timeoutSecondsint300Execution timeout (5 minutes default)
runAsstring""User context: "" (system), "user" (interactive user), or a specific username
parametersobject{}Key-value map of script parameters

script_cancel

ParamTypeRequiredDescription
executionIdstringYesExecution ID to cancel

script_list_running

No payload parameters. Returns { running: [...], count: N }.


Patching

Scan for, download, and install OS patches. Includes pre-flight checks for disk space, AC power, and maintenance windows.

ActionDescriptionKey Payload Fields
patch_scanScan for available patchessource
install_patchesInstall pending patchespatchIds
download_patchesDownload patches without installingpatchIds
rollback_patchesRoll back installed patchespatchIds

patch_scan

ParamTypeDefaultDescription
sourcestring""Audit source identifier (for logging)

Returns { pendingCount, installedCount, warning }. Also sends full patch inventory to the API as telemetry.

install_patches

Runs pre-flight checks (disk space, AC power, maintenance window, service health) before installation. Fails if any check does not pass.

ParamTypeRequiredDescription
patchIdsstring[]YesArray of patch IDs to install

download_patches

Downloads patches to local cache without installing. Runs a subset of pre-flight checks (disk space and service health, skips AC power and maintenance window).

ParamTypeRequiredDescription
patchIdsstring[]YesArray of patch IDs to download

Returns { downloadedCount, failedCount, results[] } with per-patch status. Sends progress events via WebSocket during download.

rollback_patches

ParamTypeRequiredDescription
patchIdsstring[]YesArray of patch IDs to roll back

Reboot Management

Schedule, cancel, and check the status of managed reboots (separate from the immediate reboot system command).

ActionDescriptionKey Payload Fields
schedule_rebootSchedule a deferred rebootdelayMinutes, reason, source, deadline
cancel_rebootCancel a scheduled reboot
get_reboot_statusGet current reboot schedule state

schedule_reboot

ParamTypeDefaultDescription
delayMinutesint60Minutes until reboot (1-10080, i.e. up to 7 days)
reasonstring"Scheduled by administrator"Reboot reason for logging and user notification
sourcestring"manual"Initiator: "manual", "patch", "policy", etc.
deadlinestringOptional RFC 3339 timestamp to override calculated deadline

cancel_reboot

No payload parameters. Returns { cancelled: true }.

get_reboot_status

No payload parameters. Returns the full RebootState object with schedule details.


Security

Collect security status, run malware/threat scans, and manage quarantined threats.

ActionDescriptionKey Payload Fields
security_collect_statusCollect security posture (AV, firewall, etc.)
security_scanRun a security/malware scanscanType, paths, scanRecordId, triggerDefender
security_threat_quarantineQuarantine a detected threatpath, name, threatType, severity, quarantineDir
security_threat_removePermanently remove a threatpath, name, threatType, severity
security_threat_restoreRestore a quarantined filequarantinedPath, originalPath

security_collect_status

No payload parameters. Returns the device security status including antivirus, firewall, and encryption state.

security_scan

ParamTypeDefaultDescription
scanTypestring"quick"Scan type: "quick", "full", or "custom"
pathsstring[]Paths to scan (required when scanType is "custom")
scanRecordIdstring""ID for tracking the scan in the dashboard
triggerDefenderboolfalse(Windows only) Also trigger Windows Defender scan

Returns { scanRecordId, scanType, durationMs, threatsFound, threats[], status }.

security_threat_quarantine

ParamTypeDefaultDescription
pathstringRequiredPath of the threat file
namestring""Threat name
threatTypestring"malware"Threat classification
severitystring"medium"Threat severity
quarantineDirstringPlatform defaultCustom quarantine directory

security_threat_remove

ParamTypeDefaultDescription
pathstringRequiredPath of the threat file to permanently delete
namestring""Threat name
threatTypestring"malware"Threat classification
severitystring"medium"Threat severity

security_threat_restore

ParamTypeRequiredDescription
quarantinedPathstringYesPath of the quarantined file
originalPathstringYesOriginal file path to restore to

Network

Network discovery, SNMP polling, and connectivity checks for monitoring.

ActionDescriptionKey Payload Fields
network_discoveryDiscover hosts on a networksubnets, methods, portRanges, concurrency
snmp_pollPoll an SNMP device for metricstarget, version, community, oids
network_pingPing a host (ICMP with TCP fallback)target, count, timeout
network_tcp_checkTCP port connectivity checktarget, port, expectBanner, timeout
network_http_checkHTTP/HTTPS endpoint checkurl, method, expectedStatus, expectedBody, verifySsl
network_dns_checkDNS record lookup checkhostname, recordType, expectedValue, nameserver

network_discovery

ParamTypeDefaultDescription
subnetsstring[]CIDR subnets to scan (e.g. ["192.168.1.0/24"])
excludeIpsstring[]IP addresses to skip
methodsstring[]Scan methods: ping, arp, port
portRangesstring[]Port ranges for port scanning (e.g. ["22", "80", "443"])
snmpCommunitiesstring[]SNMP community strings to try
timeoutint2Per-host timeout in seconds
concurrencyint128Max concurrent scan workers
deepScanboolfalseEnable deep scanning (more ports, slower)
identifyOSboolfalseAttempt OS fingerprinting
resolveHostnamesboolfalsePerform reverse DNS lookups
jobIdstring""Job ID for tracking

snmp_poll

ParamTypeDefaultDescription
targetstringRequiredTarget IP or hostname
portint161SNMP port
versionstring"v2c"SNMP version: "v1", "v2c", "v3"
communitystring"public"Community string (v1/v2c)
usernamestring""SNMPv3 username
authProtocolstring""SNMPv3 auth protocol
authPasswordstring""SNMPv3 auth passphrase
privProtocolstring""SNMPv3 privacy protocol
privPasswordstring""SNMPv3 privacy passphrase
oidsstring[]OIDs to poll
timeoutint2Request timeout in seconds
retriesint1Number of retries
deviceIdstring""Device ID for tracking

network_ping

ParamTypeDefaultDescription
targetstringRequiredIP address or hostname
monitorIdstring""Monitor ID for tracking
timeoutint5Timeout in seconds
countint4Number of ping attempts

Falls back to TCP connect (ports 443, then 80) if ICMP fails (common when running without root).

network_tcp_check

ParamTypeDefaultDescription
targetstringRequiredIP address or hostname
portint443TCP port to check
monitorIdstring""Monitor ID for tracking
timeoutint5Connection timeout in seconds
expectBannerstring""Expected string in the service banner

Returns { status, responseMs } and optionally { banner } if expectBanner is set. Status is "degraded" if the banner does not match.

network_http_check

ParamTypeDefaultDescription
urlstringRequiredFull URL to check (e.g. https://example.com/health)
methodstring"GET"HTTP method
monitorIdstring""Monitor ID for tracking
expectedStatusint200Expected HTTP status code
expectedBodystring""Expected string in response body
verifySslbooltrueVerify TLS certificate
followRedirectsbooltrueFollow HTTP redirects
timeoutint10Request timeout in seconds

Returns { status, statusCode, responseMs } plus { sslExpiry, sslDaysRemaining } for HTTPS endpoints.

network_dns_check

ParamTypeDefaultDescription
hostnamestringRequiredHostname to look up
recordTypestring"A"Record type: A, AAAA, MX, CNAME, TXT, NS
monitorIdstring""Monitor ID for tracking
expectedValuestring""Expected value in results
nameserverstring""Custom DNS server (e.g. 8.8.8.8)
timeoutint5Lookup timeout in seconds

Backup Management

Run, list, and stop backups using the configured backup provider.

ActionDescriptionKey Payload Fields
backup_runStart a backup job
backup_listList backup snapshots
backup_stopStop a running backup

backup_run

No payload parameters. Requires backup to be configured on the agent. Returns { jobId, status, snapshotId, filesBackedUp, bytesBackedUp }.

backup_list

No payload parameters. Returns { snapshots[], count }.

backup_stop

No payload parameters. Stops the currently running backup job.


Software Inventory

ActionDescriptionKey Payload Fields
collect_softwareCollect installed software inventory

No payload parameters. Runs the software collector and returns the full list of installed applications with name, version, publisher, install date, and size.


File Transfer

Transfer files to/from managed devices.

ActionDescriptionKey Payload Fields
file_transferInitiate a file transferdirection, path, transferId
cancel_transferCancel an in-progress transfertransferId

file_transfer

Payload is passed directly to the file transfer manager. Key fields include the transfer direction and file path.

cancel_transfer

ParamTypeRequiredDescription
transferIdstringYesTransfer ID to cancel

User Helper Commands

These commands require the user-mode helper process to be running in a user’s session.

ActionDescriptionKey Payload Fields
notify_userSend a desktop notificationtitle, body, icon, urgency, username, actions
tray_updateUpdate the system tray icon/menustatus, tooltip, menuItems

notify_user

ParamTypeDefaultDescription
titlestring"Breeze Agent"Notification title
bodystringRequiredNotification body text
iconstring""Icon path or identifier
urgencystring"normal"Urgency level: "low", "normal", "critical"
usernamestring""Target username (empty = first available session)
actionsstring[]Action button labels

tray_update

ParamTypeDefaultDescription
statusstring"ok"Tray icon status indicator
tooltipstring"Breeze Agent"Tooltip text
menuItemsarrayArray of { id, label, enabled } menu items

Breeze Agent Service Management

Linux (systemd)

Terminal window
sudo systemctl start breeze-agent
sudo systemctl stop breeze-agent
sudo systemctl restart breeze-agent
sudo systemctl status breeze-agent
# View logs
sudo journalctl -u breeze-agent -f

macOS (launchd)

Terminal window
sudo launchctl load /Library/LaunchDaemons/com.breeze.agent.plist
sudo launchctl unload /Library/LaunchDaemons/com.breeze.agent.plist
# View logs
sudo log show --predicate 'process == "breeze-agent"' --last 1h

Windows (Services)

Terminal window
Start-Service breeze-agent
Stop-Service breeze-agent
Restart-Service breeze-agent
Get-Service breeze-agent
# View logs
Get-EventLog -LogName Application -Source breeze-agent -Newest 50

Heartbeat Telemetry

The agent sends a heartbeat every 60 seconds containing:

FieldDescription
cpuCPU usage percentage
memoryMemory usage (used/total)
diskDisk usage per mount point
networkNetwork interface stats
uptimeSystem uptime
osOS name and version
hostnameCurrent hostname
agentVersionRunning agent version

User-Mode Helper

The agent includes a user-mode helper process for operations that require user-session context:

  • Desktop notifications (notify_user)
  • User-specific inventory (installed apps, browser extensions)
  • Session-aware remote desktop
  • Script execution as a specific user (runAs)
  • System tray icon updates (tray_update)

Install the user helper:

Terminal window
sudo make install-user-helper
systemctl --user enable breeze-agent-user