Eight subsystems, one defense-in-depth control plane.
The Project-AI security architecture is not a single firewall — it is eight interlocking subsystems coordinated by a central orchestrator. Each subsystem publishes invariants, exposes telemetry, and produces audit-grade evidence.
Inspired by the mythological Hydra: when a defensive agent is bypassed or disabled, the system spawns 3 replacements in a randomly-chosen language combination. 50 human × 50 programming languages → 2,500+ unique implementations.
Capabilities
▸Exponential 3× spawn factor on every confirmed bypass
▸Polyglot diversification across 50+ programming runtimes
▸Cross-language process lifecycle management
▸Generation depth bounded (0–5) with parent tracking
▸Bypass event records with risk score + attacker signature
Guarantees
✓No single-language failure can collapse the defensive layer.
✓Spawn is deterministic given a (bypass_event, lockdown_stage) tuple.
✓Every spawned agent is registered before it executes.
Invariants
Spawn factor
SPAWN_FACTOR = 3
Polyglot space
|H| × |P| ≥ 2500
Generation bound
gen(a) ≤ 5
control 02·384 LOC
Lockdown Controller
25-stage progressive system lockdown
Granular containment without shutdown. 25 lockable sections — authentication, data access, model weights, inference, credentials — escalate deterministically from risk score and bypass depth. Idempotent; survives restart.
Capabilities
▸25 lockable sections across auth, data, AI, monitoring tiers
▸Deterministic stage formula from risk and bypass depth
▸Idempotent — re-applying a stage is a no-op
▸Persistent state across process restarts
▸Observation mode for non-destructive testing
Guarantees
✓Refusal is always cheaper than uncontained execution.
✓Operational continuity at every stage below 25.
✓Lockdown state is restartable evidence, not volatile RAM.
Invariants
Stage domain
stage ∈ [0, 25]
Monotone escalation
stage(t+1) ≥ stage(t) until reset
Determinism
stage = f(risk, depth)
control 03·331 LOC
Runtime Manager
Multi-language runtime health verification
Health-gates the polyglot agent fleet. Every runtime (Python, Rust, Go, Java, …) is verified at startup with a bounded health check; selection is biased toward verified, healthy runtimes. Unhealthy runtimes degrade silently — never crash spawning.
Capabilities
▸Startup verification of 50+ runtimes with 5s timeout
✓No agent is ever spawned in an unverified runtime.
✓Failed health checks degrade — never panic.
✓Selection is reproducible given the verified set.
Invariants
Verify before use
spawn(a) ⇒ verified(runtime(a))
Timeout bound
health_check ≤ 5s
Fallback
|R_healthy| = 0 ⇒ python3
control 04·437 LOC
Observability & Metrics
Telemetry, SLOs, incident forensics
Per-agent timelines, incident graphs (Hydra topology), Prometheus-compatible metrics, and SLO tracking. The Cerberus subsystem is observable end-to-end so refusals can be replayed and defended in audit.
Capabilities
▸Per-agent timeline of tasks, decisions, terminations
Defense-in-depth for agents operating in adversarial environments. Read/write/execute permissions on agent state, numerical clipping and outlier rejection, multiprocessing-based plugin isolation, and a runtime fuzzer for resilience testing.
Capabilities
▸Agent state encapsulation with per-caller access log
▸Numerical clipping to safe bounds ([−1e6, 1e6])
▸Z-score outlier rejection on incoming tensors
▸Safe division (zero → configurable default)
▸Plugin isolation via subprocess with timeout
▸4-strategy input fuzzer for resilience tests
Guarantees
✓No untrusted code mutates agent state without authorization.
✓Numerical pathways cannot panic on NaN/Inf/div-by-zero.
✓A hostile plugin cannot exhaust the host process.
Invariants
State access
set(k, v) ⇒ caller ∈ allowed
Numeric bound
x ∈ [−1e6, 1e6]
Isolation
plugin → subprocess(timeout)
control 07·556 LOC
Data Validation
Secure parsing · XXE · CSV · JSON
Validate everything, trust nothing, sanitize by default. XML via defusedxml (XXE-blocked), CSV with formula-injection detection, JSON with schema enforcement, and a 17+ pattern data-poisoning defense (XSS, SQLi, path traversal, Log4Shell, template injection, CRLF).
▸JSON: schema validation with required-field enforcement
▸Attack-pattern matcher (17+ classes)
▸SHA-256 content hash on every parsed payload
Guarantees
✓No untrusted XML can read the local filesystem.
✓No spreadsheet formula reaches end-user clients.
✓Every parsed payload has a content-addressed hash.
Invariants
XXE
parse_xml(p) ⇒ no_entity_resolution
CSV cell
cell[0] ∉ {=, +, -, @}
Schema
data ⊨ schema
control 08·24.7 KB
Contrarian Firewall Orchestrator
Monolithic central security kernel
The central kernel. Coordinates Hydra, Lockdown, Runtime, Observability, Monitoring, Agent Security, and Data Validation through a single orchestration point. Adaptive chaos/stability balancing, bi-directional agent communication, deep integration with TARL governance and the Triumvirate.
Capabilities
▸Modes: passive · active · aggressive · adaptive (default)
▸Stability tiers: stable · balanced · chaotic · maximum chaos
▸Threat intel ingest from 6 sources (swarm, Cerberus, Thirsty-Lang, …)
▸Real-time auto-tuning of chaos / stability balance