Inspiration

Autonomous AI agents powered by frontier models (such as Llama-3-70B) are rapidly transitioning from conversational chat into physical actuation: managing battery energy storage systems, microgrid relays, cooling loops, and industrial machinery.

However, connecting an unconstrained LLM directly to a physical actuator creates an existential safety hazard. A single hallucinated parameter, inverted PID sign, or excessive overclock can induce thermal runaway, mechanical resonance, or trip facility circuit breakers in seconds.

Existing solutions either rely on passive post-facto alerts (which trigger after the hardware has already failed) or hardcoded static limits (which strip away the agent's autonomous adaptability).

We asked ourselves: What if an AI agent had to mathematically prove that its proposed action would survive worst-case physical parameter drift before the physical actuator is allowed to move?

That inquiry gave birth to VERITAS-CORE.


What It Does

VERITAS-CORE establishes a closed-loop, pre-flight verification gate and deterministic hardware sentinel between autonomous AI agents and physical hardware:

  1. Structured Agent Proposal: When an anomaly occurs, an agent (powered by Featherless AI Llama-3-70B) diagnoses the fault, proposes an action vector, and states a quantitative expectation: Predicted ΔT.
  2. Adversarial Pre-Flight Sandbox: In under 10 milliseconds, VERITAS executes 50 parallel Runge-Kutta 4th Order (RK4) ODE simulations over a 10-second forward horizon, perturbing thermal capacitance (±10%), convection (±15%), and sensor noise.
  3. Pre-Flight Certification Gate: Only actions achieving a ≥95% pass rate without violating safety thresholds (85.0°C thermal ceiling, 2.80A current trip, 10.5V rail floor) receive a cryptographically signed HMAC-SHA256 certification receipt. Unsafe proposals are rejected before actuation.
  4. Deterministic Hardware Sentinel (<5ms Interlock): Even if all software layers fail, an ESP32-S3 microcontroller running a 200Hz hardware timer interrupt continuously samples an INA219 current shunt and 10k NTC thermistor. An analog-domain hardware comparator latches a fail-closed solid-state relay open in <5ms upon overcurrent or overtemperature.
  5. Prediction vs. Reality Divergence & Trust Ledger: Following actuation, VERITAS measures the actual sensor delta (ΔT_actual - ΔT_pred). The resulting Euclidean divergence norm ‖ε‖ dynamically updates the agent’s longitudinal trust rating:
    • AUTONOMOUS (≥0.80): Immediate pre-flight dispatch.
    • SUPERVISED (0.50 - 0.79): Operator verbal confirmation required via Dialogate.
    • BLOCKED (<0.50): Actuation authority revoked until recalibrated.
  6. Acoustic Operator Dispatch: All critical events, certification decisions, and interlock trips are immediately synthesized into natural audio operator briefings via Dialogate.

How We Built It

  • Embedded Firmware: ESP32-S3 firmware in C++ with 200Hz hardware timer interrupt, FreeRTOS task isolation, I2C INA219 driver, and fail-closed relay pinout.
  • Backend Server: Python 3.12 / FastAPI streaming 10Hz physical telemetry over WebSockets.
  • Operations Console: Aerospace-grade dark mode dashboard built with HTML5, CSS Grid, and custom Canvas 2D oscillographs (rendering real-time 100-sample live telemetry and 50-trace Monte Carlo perturbation fan-outs).
  • Coupled RK4 Thermal/Electrical Physical ODE Solver: Solves Joule heating (I²R), fan convection (k_cool · ω), and rail voltage dynamics.
  • Adversarial Perturbator: 50-run parameter dispersion testing against worst-case environmental uncertainty.
  • Divergence Trust Ledger: Mathematical state tracking that penalizes prediction-reality divergence and dynamically shifts agent authority tiers.
  • Sponsor Armor:
    • Featherless AI: Serverless Llama-3-70B API integration generating structured JSON physical recovery proposals with calibrated thermal delta predictions.
    • Dialogate Voice Bridge: Low-latency acoustic alert synthesis providing actionable operator verbal briefings in industrial control environments.

Challenges We Ran Into

  • Numerical ODE Stability vs. Latency: Running 50 forward simulations in Python within milliseconds can be bottlenecked by object allocation. We optimized the Runge-Kutta 4th order integrator into vectorized math loops, calculating state derivatives in <0.2ms per run.
  • Microcontroller Watchdog Race Conditions: If the host PC lags during USB serial streaming, the microcontroller could falsely trip a watchdog timeout. We engineered a dual-rate heartbeat architecture: the ESP32-S3 evaluates safety invariants locally at 200Hz regardless of serial connection status, maintaining absolute autonomy over the fail-closed relay.
  • Ground-Truth Video Recording Without Synthetic Frames: We built an automated Playwright recording pipeline that spins up the actual web server on localhost, clicks UI buttons, streams real WebSocket data, and records uncompressed 1080p footage composited with studio neural audio and normalized via FFmpeg loudnorm.

Accomplishments That We're Proud Of

  • 12/12 Physical Benchmark Cases Passed (100% Success Rate): Rigorous real-world fault scenarios (TC01–TC12), including cooling fan seizure, hallucinated overclocking, load surges, sensor drift false alarms, boundary perturbations, and catastrophic short circuits.
  • Sub-10ms Pre-Flight Verification: The 50-run Monte Carlo RK4 ODE sandbox computes complete trajectories in an average of 9.52 milliseconds.
  • Zero-Exception UI Gate: Validated the entire frontend and WebSocket telemetry stream using headless Playwright, achieving 0 console errors and 0 unhandled page exceptions.
  • 100% Cryptographic Evidence Integrity: Every single benchmark decision generates a verifiable HMAC-SHA256 signature, validated end-to-end via py -3.12 run.py --verify-evidence.

What We Learned

The fundamental lesson of cyber-physical AI is that prediction is the ultimate test of intelligence. An AI agent should not merely be evaluated on whether its text sounds plausible; it must be evaluated on whether its physical prediction matches physical reality. By making prediction accuracy the governing metric of actuation authority, we can safely deploy autonomous AI agents into mission-critical infrastructure.


What's Next for VERITAS-CORE

  • Industrial CAN Bus & Modbus TCP Support: Deploying VERITAS-CORE as an inline bump-in-the-wire hardware dongle for existing SCADA and PLC networks.
  • Multi-Agent Swarm Arbitration: Extending the pre-flight sandbox to verify multi-agent competitive or cooperative actuation across power distribution grids.
  • Formal Verification Methods: Integrating SMT solvers (Z3) alongside Monte Carlo RK4 for mathematical safety guarantees on non-linear hybrid dynamical systems.

Built With

Share this project:

Updates

Submission history