# AEGIS: A Multi-Layered Security Framework for Autonomous AI Agents: v2.4 → v2.5

From v2.4 (2 Jun) to v2.5 (2 Jun): 28,437 words to 28,537 words, 180 words in new or rewritten paragraphs and 80 taken out, 8 paragraphs changed.

## Change note of v2.5

**Updates the status of the learned safety gate**

A small factual update. The reference-implementation audit now says the inference library for the learned safety gate is present, while the gate still runs in observe-only mode and the regex rules remain the real veto.

## Changed paragraphs

Marks: [-removed-] {+added+}.

### 2.1 Class I — Full Agent Takeover

*MCP OAuth authentication bypass*: The Model Context Protocol, now widely used as the agent tool-call surface, introduced OAuth-based authorization flows. Pivot Point Security (2026) found that 43% of publicly accessible MCP endpoints had misconfigured authorization boundaries, allowing an attacker to forge tool-call authorization tokens without user interaction. This is a [-2026-native-] {+recent+} vector [-not present in earlier AEGIS revisions and one-] {+whose prevalence is+} likely to grow [-in prevalence-] as MCP adoption [-expands.-] {+expands and the agent tool-call surface increasingly runs over it.+}

### 11. Component Security Surfaces of a Cognitive-Agent Architecture

- **DEPLOYED** — implemented in production as a named plugin or cron - **PHASE 1** — partially implemented; observe-only or limited capability - **PARTIAL** — subset of designed functionality implemented - **CONCEPTS ADOPTED** — design ideas absorbed into adjacent components; no dedicated plugin - **DESIGN ONLY** — architecture [-proposed in J-paper;-] {+specified on paper;+} not built

### 11.10 AMYGDALA — Learned Intuition and Safety Gate

AMYGDALA operates two neural ensembles. The Prudence ensemble evaluates every tool call before execution and scores it for safety risk; when the ensemble crosses its threshold or disagreement between ensemble members exceeds a conservatism override, the conservative vote wins and the tool call is blocked. The Personality ensemble calibrates behavioral tone and writes nudges to a configuration file that subsequent sessions consume. The *learned* Prudence ensemble currently runs observe-only — it logs what it would block without aborting — but a *deterministic* AEGIS veto (the rule-based destructive-command gate plus an AEGIS pre/post-check) now hard-blocks unconditionally, independent of that observe-only ramp. The reference-implementation audit in §11.14.4 details the current state, including the caveat that the [-neural-] {+learned Prudence+} path [-still falls back to the rule-based gate because-] {+— though+} its [-native-] inference dependency is {+now loaded — has+} not yet [-installed.-] {+been calibrated against a production attack corpus, so the boundary that actually fires is the deterministic veto rather than the neural classifier.+}

### 11.14 The Reference Implementation — What TinkerClaw Enforces Today

1. The [-neural ensemble still **falls back to-] {+**deterministic regex gate, not a learned classifier, is+} the [-rule-based gate** in the running deployment, because the-] {+absolute veto that holds today.** The+} native ONNX inference dependency is [-not installed. The-] {+now present and staged into the plugin's bundled runtime, so the+} neural model path is [-correct-] {+live rather than missing —+} but [-latent —-] the [-absolute veto-] {+*learned* ensemble runs in its observe-only training ramp (it logs the verdict it *would* reach without aborting), and its risk thresholds are not yet calibrated against a production attack corpus. Until+} that [-holds today-] {+learned half is measured against a benchmark, the boundary that actually fires+} is the regex [-gate, not a learned classifier.-] {+gate.+} This is precisely the §4.5 calibration: do not count the probabilistic layer as a boundary until it is demonstrably present [-and measured.-] {+*and measured*, not merely loadable.+} 2. The veto is only as good as its rule set (see below). It is a deterministic floor, not a complete intent verifier — the same architectural limit §7.3 identifies in NemoClaw's Layer 5.

### 11.14 The Reference Implementation — What TinkerClaw Enforces Today

1. **The blocking controls are deterministic; the learned ones are signal.** Every control that actually held under the audit was a code-layer mechanism the model could not influence. The neural gate's value, until its weights and the deterministic veto were both in place, was observability — knowing what it *would* block. This is §4.5's calibration stated as an engineering fact rather than a recommendation. 2. **A wrapper is a security boundary; a prompt is a preference.** The reversibility contract that prevents an Inbox Zero recurrence lives in a shell wrapper, not in the system prompt — because the prompt is bypassable by the very injection class (§4.5) the wrapper is there to survive. Where an action is irreversible or outbound, the AEGIS prescription is to push the guard down to code (§11.14.2). 3. **Disclose the observe-only gaps.** The most useful sentence in this chapter is the one admitting {+that+} the [-neural-] {+learned+} ensemble [-falls back to rule-based because-] {+still runs observe-only and is not yet+} a {+measured boundary — even though its inference+} dependency is [-missing.-] {+now loaded.+} An agent-security posture that [-hides-] {+reports a control by+} its [-latent controls behind their-] *intended* {+behavior rather than its *current*+} behavior is the over-claiming failure mode §4 was written to prevent. The framework's credibility rests on reporting the gate that is still in training as exactly [-that.-] {+that — present, loadable, but not yet counted.+}

### 11.14 The Reference Implementation — What TinkerClaw Enforces Today

**Open upgrade items** flowing from this audit, offered as the §14.2 future-work agenda made specific: [-install the native inference dependency so-] {+calibrate and benchmark+} the learned AMYGDALA [-half-] {+ensemble — now that its inference dependency is loaded — so it+} becomes a [-measured-] {+*measured*+} control rather than [-a latent one;-] {+an observe-only one before it is allowed to abort tool calls;+} harden the personality-nudge file (§11.10) and add load-time hash verification before the gate exits observe-only; adopt pairing-code / scope-intersection authentication for subagent reconnect (the §2.1.1 GHSA-hf68 mitigation, re-validating the toolset intersection on every reconnect rather than trusting the initial pairing); and pair the §1.4 CVE-2026-25253 WebSocket-hijack case study with the loopback-bind-plus-token-auth pattern the browser relay (§11.14.3) already demonstrates.

### 14.1 Limitations

**Qualitative risk scores.** Despite the calibration methodology in §6, probability and severity ratings remain expert judgment. The risk matrices should be treated as prioritization heuristics, not actuarial precision. Different practitioners with different threat intelligence would assign [-somewhat-] different scores.

### Appendix B: Threat-to-Section Cross-Reference

*AEGIS: A Multi-Layered Security Framework for Autonomous AI Agents* *Author: Oscar Serra | Date: June 2026 | Version: [-2.4*-] {+2.5*+} *Classification: Internal — IT Contractor Review*
