Safety by Design

What if the AI does something stupid?

The same question every industrial buyer asks. Here's how we answer it.

5-Tier Authorization

Every AI action has a tier. Every tier has an authorization rule.

Brain's AI agent operates under a strict 5-tier model. Read operations are always allowed. Safety-critical actions require admin approval AND explicit confirmation. No exceptions, no shortcuts, no black boxes.

0Tier

Category

Read

None

Authorization

Always allowed

Example

What's the current temperature?

1Tier

Category

Inform

None

Authorization

Always allowed

Example

Show me the alarm log

2Tier

Category

Configure

Low

Authorization

Agent enabled (default)

Example

Create a new tag for tank 3

3Tier

Category

Control

Medium

Authorization

Operator approval or pre-approved rule

Example

Start the heater at 60°C

4Tier

Category

Safety-Critical

High

Authorization

Admin approval + confirmation

Example

Disable the overpressure alarm

Auto-Lock

Three strikes, and the agent locks itself out.

If Brain's AI agent executes 3 or more Tier-3 actions in 60 seconds, all autonomous modes are disabled automatically. Requires manual re-enable by an admin. This prevents runaway loops and accidental cascading changes.

T+0s

Tier-3 action #1

Within 60s window

T+18s

Tier-3 action #2

Within 60s window

T+47s

Tier-3 action #3

Within 60s window

Result

All autonomous modes disabled

Requires manual admin re-enable.

Emergency Stop

One endpoint kills everything.

POST /ai/emergency-stop. Kills all agent activity instantly. Cancels pending actions. Disables all autonomous modes. Notifies all operators. One call, full shutdown.

curl · emergency-stop.sh

POST https://brain.local/ai/emergency-stop
Authorization: Bearer YOUR_ADMIN_TOKEN
Content-Type: application/json

{
  "reason": "Unusual behavior detected",
  "disable_until": "manual"
}

// Response
HTTP 200 OK
{
  "status": "all_autonomous_disabled",
  "actions_cancelled": 7,
  "operators_notified": 12,
  "timestamp": "2026-04-20T14:32:08Z"
}

Audit Trail

Every action. Every approver. Every timestamp.

Every AI action is logged to SQLite with: the tool used, the arguments, the tier, who approved it, when, and what the result was. Queryable via admin dashboard. Exportable for compliance audits. Immutable.

audit_log.sqlite · event #4f82a1c9e

IMMUTABLE
{
  "id": "evt_4f82a1c9e",
  "timestamp": "2026-04-20T14:18:42.193Z",
  "tool": "plc.set_setpoint",
  "tier": 3,
  "args": {
    "tag": "HEATER_01.setpoint",
    "value": 60.0,
    "unit": "celsius"
  },
  "approved_by": "operator:mkowalski",
  "approval_method": "pre_approved_rule:rule_88c",
  "result": "success",
  "duration_ms": 142,
  "previous_value": 55.0,
  "session_id": "sess_9a3b7e2"
}

Approve & Remember

Day one: the agent asks permission. Day thirty: it runs autonomously.

When an operator approves a Tier-3 action, they can select “Approve & Remember” to create a pre-approved rule. Future identical situations are handled without re-prompting. The agent learns YOUR safety boundaries.

Day 1

Agent asks permission

Pending approval · Tier 3

Start heater HTR_01 at 60°C?

Tank TK_03 temperature low · warmup sequence required

DenyApproveApprove & Remember ✓

Operator clicks Approve & Remember. A pre-approved rule is created.

Day 30

Agent runs autonomously

HTR_01 → 60°C (auto, rule:88c)

HTR_02 → 45°C (auto, rule:88c)

PUMP_03 ON (auto, rule:91a)

VALVE_V7 → 45% (auto, rule:91a)

HTR_01 → 62°C (auto, rule:88c)

MIXER_M2 → 180rpm (auto, rule:94e)

+ 14 more approved operations...

20+ operations executed autonomously. Every one logged, auditable, and revocable.

Change Management

Propose. Review. Approve. Deploy.

PLC changes go through a Git-native workflow. Every change is proposed as a diff, reviewed by authorized engineers, approved with signature, and deployed with one-click rollback. Zero unreviewed PLC changes. Ever.

01

Propose

AI or engineer proposes a PLC change as a Git diff.

02

Review

Authorized engineers inspect the diff, run simulations.

03

Approve

Signed approval required before deploy. All signatures logged.

04

Deploy

One-click deploy with instant rollback. Zero unreviewed changes.

Safety is not a feature. It's the foundation.