Agent API
Copies this page as Markdown with context, so an AI can walk you through your case step by step.
The API used by the official agent. Useful if you want to plug in your own collector or audit what the agent sends.
Authentication
Every call is a POST to https://ganyant.com/api/agent/<action> with a JSON body and these headers:
Authorization: Bearer gyk_… # workspace API key
X-Ganyant-Machine: <machine-id> # stable server identifier
Content-Type: application/jsonWe only store the SHA-256 hash of the key. If it is revoked from the dashboard, calls return 401.
Actions
| Action | Purpose | Body |
|---|---|---|
register | Create or update the server | machine_id, hostname, os, kernel, arch, agent_version, cpu_cores, mem_total_bytes |
metrics | Batch of up to 120 samples (Pro+) | List of cpu_pct, mem_used_bytes, mem_total_bytes, swap_*, load1/5/15, disks[], net_rx_bps, net_tx_bps, ts |
events | Security signals | List of kind, severity, source_ip, details |
config | Backup jobs and plan mode | {} |
presign | Upload URL for a snapshot | job_id, size_bytes, original_bytes, kdf_salt, manual |
complete | Confirm the upload | snapshot_id, ok, blake2b, error |
restore | Download URL for the snapshot | job_name, at |
kind values: ssh_bruteforce, rdp_bruteforce, traffic_anomaly, new_listening_port, disk_predictive.
Errors
400 | Invalid body |
401 | Invalid or revoked API key |
402 | Feature or limit not included in the plan (for example, PLAN_LIMIT:vault_quota) |
404 | Unknown server, job or snapshot |
Source code
The agent is a single readable Python file and the collector a single C++20 file: ganyant_agent.py and ganyant_probe.cpp. You can review exactly what it sends before installing it.