SafeAI documentation

Architecture

What SafeAI is made of, where it sits in your network, the ports it uses, and how big a server it needs.

What SafeAI is made of, where it sits in your network, what it connects to, and how big a server it needs. For the exact security model see Security model; to install, Installation guide; to design a deployment (reference designs, firewall rules, a worksheet), Design guide (SRND); for what the agent adds on computers, With the agent and without it.

SafeAI architecture

In one paragraph

SafeAI is one server you run (a VM, an appliance image, or a container on your own Linux server) on your management network. It logs in to your network devices, servers, VMware and cloud accounts with read-only accounts, reads their configuration and state, removes secrets, and stores the result on that server. It explains every line it reads, finds problems, notices every change, and investigates incidents. Your devices can also send it their logs. People use it in a browser. It changes nothing unless you turn on approved fixes, and then only a built-in fix that a person approved. Nothing is sent to SafeCadence, and it needs no internet access except for the cloud accounts and optional services you add.

The parts

Part What it does
Readers Log in on a schedule (every 15 minutes by default) and whenever a device logs a change. Network devices: SSH and display-only commands (show running-config, show, display set …); Palo Alto: the XML API. Linux: one fixed display-only script over SSH. Windows: one fixed read-only PowerShell script over WinRM. VMware: the vSphere API. Clouds and identity providers: their read-only APIs. SSH host keys and certificates are checked before any password is sent.
Log intake Receives syslog (UDP/TCP 514) and, when you turn it on, NetFlow/IPFIX (UDP 2055) and OpenTelemetry logs. A configuration-change message makes SafeAI read that device within seconds; sign-in and connection messages feed attack detection. Logs are accepted only from devices in the device list (or trusted log relays).
Redaction Before anything is stored, recognised secrets (passwords, keys, SNMP communities, pre-shared keys, tokens …) are replaced by a keyed fingerprint, so SafeAI can tell a secret changed without keeping it. A configuration that still contains a certain secret is not stored at all.
Analysis Catalogs that explain each configuration line per platform; checks that turn configurations into findings; comparison with the last good copy (changes, line by line, with who and whether it was planned); controls; incident investigation that proves or disproves causes with SafeAI's own checks; AI security readiness; detection of automated attacks in logs. All of it is fixed code: no AI decides a finding, a cause or a fix.
Store Everything stays on the server, under /var/lib/safeai: configurations (redacted), changes with tamper-evident fingerprints, incidents, findings, and the passwords you gave it, encrypted. Nightly backups contain no keys.
AgentGuard The policy engine every action goes through: fixes and undos are held for approval bound to the exact plan; live checks and AI questions are allowed by policy and recorded; anything else is denied. Its record is hash-chained. Without it SafeAI fails closed.
Console and API The web console (HTTPS 443) and a read API with tokens. Five roles (viewer, operator, approver, administrator, owner), single sign-on (OpenID Connect) and two-step sign-in.
Agent port TCP 8444 with mutual TLS, for the SafeAI Agent (Windows, Linux, macOS computers, including the AI tools on them) and site collectors. Both connect out to SafeAI; SafeAI never connects to them and they listen on no port.
Optional Alerts (email, Teams, Slack, webhook, syslog to your SIEM); ServiceNow or any change system (so planned work isn't flagged); an AI model you choose (off by default) that receives only redacted text and can only suggest causes or answers that SafeAI then checks.

How data flows

  1. Read. A reader logs in with the read-only account and runs display-only commands, or calls a read-only API.
  2. Redact. Secrets are replaced before anything is written to disk.
  3. Compare and explain. The configuration is compared with the last one; each changed line is explained from the catalog; checks produce findings.
  4. Decide what matters. A change is matched to planned work (maintenance windows, ServiceNow, approved fixes); a change nobody planned, or one that introduced a high-severity problem, raises an alert.
  5. Show and alert. People see it in the console; alerts go to the channels you chose.
  6. Change (only if you turned fixes on). A person proposes a built-in fix; someone else approves its exact plan and a window; AgentGuard checks the approval again; SafeAI sends it with a separate write account, reads the device again itself, and rolls back if the problem is still there.

Where it sits

Put SafeAI on a management network that can reach your devices' management addresses over SSH, and that administrators can reach over HTTPS. It does not sit in the traffic path: it never sees user traffic, only configurations, state and the logs devices send it. If SafeAI is down, your network is not affected; it simply stops watching until it is back.

Direction Port For
To SafeAI TCP 443 The console and API, from administrators
To SafeAI UDP/TCP 514 Device logs (syslog), from devices or your log server
To SafeAI TCP 8444 SafeAI Agents and site collectors (mutual TLS)
To SafeAI (optional) UDP 2055 NetFlow / IPFIX
From SafeAI TCP 22 SSH to network devices and Linux
From SafeAI TCP 5986 WinRM over HTTPS to Windows
From SafeAI TCP 443 vCenter/ESXi, Palo Alto, cloud and identity-provider APIs you add; optional SSO, ServiceNow, webhooks, an AI model
From SafeAI (optional) TCP 587 / 25 Your mail server, for alerts

The ports are published by Docker, which puts its rules ahead of the server's own firewall: restrict them on your network firewall or bind SafeAI to one address (Installation guide, Network access).

Ways to deploy it

Pattern When Notes
One server Most networks, one or a few sites that one server can reach The appliance image or the bundle on your own Linux server. Start with one site.
Central server and site collectors Sites whose management networks the central server can't reach, or a large estate A collector at each site reads that site's devices with its own accounts (they never leave the site), removes secrets there, and connects out to the central SafeAI on 8444. Lab-tested: a collector added 44 routers and switches to a fresh central server in about a minute.
MSP: one server, many clients Managing several customers A client is a set of sites. Client accounts see only their own devices; with client sign-off only the client's own approvers can approve changes on its devices. Overlapping private addresses between clients are kept apart.
No internet access Air-gapped or restricted networks Install and upgrade from the signed bundle (it even carries Docker); point the AI setting at a model on your own network, or leave it off. Lab-tested with every packet to the internet dropped.

The bundle installs the same way everywhere: the appliance (OVA for vSphere; images for Hyper-V, Proxmox and KVM), your own Linux server, Ansible, Terraform for AWS, Azure and Google Cloud, or containers. What each of these has been run on so far is listed in the zero-touch guide (Zero-touch deployment): the appliance and the Linux installer are tested on the SafeCadence lab; the hypervisor images, Terraform and Ansible are built to each tool's documentation and not yet run at a customer.

Sizing

Measured on the SafeCadence lab, 61 devices, on the minimum server (2 CPUs, 4 GB memory), with device logs stored and a realistic traffic and attack generator running around the clock:

Measure Value
SafeAI's memory about 165 MB (the server as a whole: under 1 GB used of 4 GB)
CPU about 1% on average; load average 0.2
Data directory about 940 MB in all: backups 600 MB (19 of them: 14 nightly plus the ones taken before upgrades), stored logs 214 MB, everything else about 120 MB
One backup about 50 MB compressed

Scale test (simulated devices)

To size larger networks we ran SafeAI 2.9.75 against simulated fleets of 500, 1,000 and 2,000 devices that answer over SSH exactly like real ones: 85% Cisco IOS routers (configurations of about 4 KB), 10% FRRouting, 5% FortiGate firewalls (about 285 KB and 7,000 lines each, the largest configurations we have seen). SafeAI ran on one CPU core; the simulated devices ran on a second core. Default settings: every device read every 15 minutes, 16 at a time. Every device was read successfully in every run, with no errors.

Devices Memory (SafeAI) One full read of every device Console pages (slowest) CPU when idle Data (no logs) One backup
500 420 MB 3 min 0.4 s (device list) 0.5% 47 MB 3 MB, 3 s
1,000 735 MB 6 min 0.6 s (device list) 0.6% 89 MB 6 MB, 15 s
2,000 1.3 GB 12 min 1.2 s (device list) 0.9% 170 MB 11 MB, 37 s

The first read after adding devices takes longer (about 17 minutes for 2,000), because every configuration is analysed for the first time. During that first read SafeAI kept its core busy only about a fifth of the time; the limit was how fast the simulated devices answered, so real read times depend mostly on your devices and links. Changes made on 5% of the devices between two reads were all recorded.

What this does not cover: real devices on real links (slower answers, timeouts), stored logs and NetFlow at that scale, and many people using the console at once. Before 2.9.75, memory grew about 2 MB per device (2.1 GB at 1,000 devices); 2.9.75 fixed that.

Computers (simulated)

Made-up computers (Windows and macOS posture facts and a Wi-Fi report each) and one made-up Wi-Fi controller with one access point per 25 computers and half as many Wi-Fi devices again without an agent. Measured in the server process, not through a browser.

Computers Access points Devices on Wi-Fi Computer posture page, first open Wi-Fi page Follow the path Memory added Data added
100 4 150 0.3 s under 0.1 s under 0.1 s 9 MB 3 MB
500 20 750 0.6 s under 0.1 s under 0.1 s 18 MB 9 MB
2,000 80 3,000 2.2 s 0.1 s 0.1 s 52 MB 22 MB
5,000 200 7,500 5.4 s 0.2 s 0.4 s 113 MB 48 MB

On the lab, a computer's stored report is between about 1 KB (a Mac) and 40 KB (a Linux server with its package list). What this does not cover: that many real agents reporting over mutual TLS at once, thirty days of user-experience history, and many people in the console together. Until those are measured, plan on 4 CPUs and 8 GB from about 1,000 computers up.

What to plan for

  • The minimum (2 CPUs, 4 GB, 20 GB disk) is enough for reading and watching up to about 1,000 devices with log storage off.
  • Up to 2,000 devices: 4 CPUs and 8 GB. A full read of 2,000 devices took 12 minutes, inside the default 15-minute interval; if your reads take longer, raise collect.interval_min or collect.parallel (Settings → Collection).
  • Disk for logs. If you turn on log storage, it keeps logs for retention_days (default 30) with a cap of max_mb_per_day (default 2 GB a day). The worst case at the defaults is about 60 GB, so either give the server more disk (100 GB is a comfortable start) or lower logs.max_mb_per_day and logs.retention_days to what you need (Settings → All settings).
  • Disk for backups and upgrades. 14 nightly backups are kept on the server (plan for about 15 times one backup), and each upgrade keeps the previous version for rollback (about 400 MB each).
  • More than 2,000 devices, or many sites: we haven't measured beyond 2,000. Plan on site collectors and talk to us so we can size it with you.

What it does not do

  • It does not sit in the traffic path, inspect user traffic, or block anything. It is not a firewall: when it detects an attack it can draft a block on a FortiGate as a change request, for a second person to approve and a person to apply; the firewall enforces it.
  • It does not change a device unless an owner turned on approved fixes, an approver approved that exact plan, and the device has a separate write account. Only the built-in fixes exist; nothing free-form is ever sent.
  • It does not send anything to SafeCadence.
  • It does not run as more than one server: there is no high availability in this release. If the server is down, nothing is watched (your network is unaffected); nightly backups and a documented restore bring it back on a new server.

These pages are the documentation that ships inside SafeAI 2.9.85.1, the version you download. Something unclear or wrong? Tell us.