Back to browse
GitHub Repository

Ultra-lightweight (24-byte RAM), real-time safety interceptor for RL agents and LLM control on embedded hardware. MISRA-C compliant, <1.2µs latency.

0 stars

MicroSafe-RL – Sub-microsecond safety layer for Edge AI 1.18µs latency

by DREDREG·Apr 2, 2026·2 points·0 comments

AI Analysis

●●●BangerWizardryNiche GemBig Brain

1.18µs safety layer on STM32 beats software watchdogs by orders of magnitude.

Strengths
  • Sub-microsecond latency (85 cycles at 72MHz) enables real-time hardware protection.
  • Zero malloc and 20 bytes RAM makes it viable on cheapest microcontrollers.
  • Python Auto-Tuner generates C++ parameters from 2 minutes of telemetry data.
Weaknesses
  • Commercial license limits open-source adoption and community contributions.
  • Extremely niche audience limits broader developer interest and feedback.
Category
Target Audience

Embedded engineers deploying RL agents on STM32 and ESP32

Post Description

I built MicroSafe-RL to solve the "Hardware Drift" problem in Reinforcement Learning. When RL agents move from simulation to real hardware, they often encounter unknown states and destroy expensive parts.

Key specs:

1.18µs latency (85 cycles on STM32 @ 72MHz)

20 bytes of RAM (no malloc)

Model-free: It adapts to mechanical wear-and-tear using EMA/MAD stats.

Includes a Python Auto-Tuner to generate C++ parameters from 2 mins of telemetry.

Check it out: https://github.com/Kretski/MicroSafe-RL

Similar Projects

AI/ML●●●Banger

MicroSafe-RL – Deterministic 1.18µs safety layer for Edge AI

Bare-metal safety shield stops LLM hallucinations from breaking robots in 1.18µs.

WizardryBig BrainNiche Gem
DREDREG
102mo ago
Infrastructure●●●Banger

RustyRAG lowest-latency open-source RAG on GitHub

Sub-600ms RAG across continents without GPU beats standard vector-DB-plus-LLM stacks.

WizardryDark Horse
zer0tokens
103mo ago