explaingit

emberian/svenvs

Analysis updated 2026-05-18

1Standard MLAudience · researcherComplexity · 5/5Setup · hard

TLDR

A research project that lets an AI agent modify itself only when mathematical proofs confirm it stays inside strict safety rules.

Mindmap

mindmap
  root((svenvs))
    What it does
      Safety envelope for AI
      Proof gated self modification
      Tiered verification
    Tech stack
      Standard ML
      HOL4
      CakeML
    Use cases
      AI safety research
      Formal verification study
      Proof assistant demos
    Audience
      Researchers
      Formal methods engineers
      AI safety teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study how a machine checked proof can gate an AI's self modifications.

USE CASE 2

Run the included cart and pole and jailbroken language model demos inside a proven safety envelope.

USE CASE 3

Use CLAIMS.md as a template for honestly documenting proved versus assumed guarantees in a safety project.

What is it built with?

Standard MLHOL4CakeML

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires installing HOL4 (and optionally CakeML's Candle prover) before the demo will run.

In plain English

svenvs is an experimental research project that builds a safety envelope for an AI agent, letting it act and even improve itself while a mathematically checked proof guarantees it cannot break a defined set of safety rules. The idea is to give an AI system a sandboxed place to operate in where every action, including changes the AI makes to its own code, has to pass through a gate that is formally verified: a proof assistant checks the logic step by step before anything is allowed to run. The system is organized into three tiers that build on each other. Tier 1 works with just HOL4, a proof assistant, and includes a working example agent, a cart and pole simulation and a jailbroken language model, contained inside the verified rules. Tier 2 adds a built chain from CakeML's Candle prover, which lets the system prove and recheck its own upgrades. Tier 3 goes further: the core safety proofs are recertified live, while the system is actually running, by the Candle prover itself rather than just checked once ahead of time. The project is unusually direct about what it does not claim. A file called CLAIMS.md lists exactly which theorems are fully proved without assumptions, and which rely on three named assumptions that are spelled out rather than hidden. One of those three assumptions has already been proven true for a specific finite test case, turning it from an assumption into a proved result. Automated checks confirm there are no shortcut proof steps, meaning nothing is marked verified without actually being checked. svenvs is written in Standard ML and depends on the HOL4 and CakeML proof tools. It comes with a two minute demo script that builds the core system, runs the checks, and shows the results directly, along with detailed install and reproduction instructions for anyone who wants to verify the claims themselves rather than take them on faith.

Copy-paste prompts

Prompt 1
Walk me through how the Tier 1, Tier 2, and Tier 3 verification layers in svenvs build on each other.
Prompt 2
Explain what CLAIMS.md is tracking and why the three listed assumptions matter for trusting this system.
Prompt 3
Help me set up HOL4 so I can run svenvs's two minute demo script.
Prompt 4
Summarize what svenvs proves about AI self modification and what it explicitly does not claim.

Frequently asked questions

What is svenvs?

A research project that lets an AI agent modify itself only when mathematical proofs confirm it stays inside strict safety rules.

What language is svenvs written in?

Mainly Standard ML. The stack also includes Standard ML, HOL4, CakeML.

How hard is svenvs to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is svenvs for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.