Skip to main content
Hiroshi allows agents to programmatically generate and install custom automation scripts dynamically using the Dynamic Skill Creator (create_skill) laboratory loop.

πŸ”„ The Self-Healing Validation Loop

To ensure new scripts don’t crash the background runtime, custom code generated by agents undergoes a multi-layered sandboxed compilation checklist before hot-reload promotion:
  [ Generate Code ]
          β”‚
          β–Ό
 [ Syntax Compilation ] ── (python -m py_compile) ──> Fail ──> [ Self-Correct Loop ]
          β”‚                                                              β–²
       Success                                                           β”‚
          β–Ό                                                              β”‚
 [ Dry-Run Execution ] ──── (Feed {} on stdin) ──────> Fail β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
       Success
          β–Ό
   [ Hot-Reload ]
  1. Syntax Verification: The engine writes code to a temporary sandbox directory and compiles it (e.g. python -m py_compile for Python) to trap syntax and formatting bugs.
  2. Dry-run testing: Spawns the script under a strict 3-second timeout limit and feeds {} to stdin to catch import errors or runtime exceptions.
  3. Self-Correction: If verification steps return failure logs, the exceptions are fed back into the agent’s reasoning loop, prompting automatic self-healing edits.
  4. Soft-Reload Promotion: Once verified, the thread-safe mutex scans the skills directory and loads the new skill dynamically without needing a daemon reboot.