About
Multivergence is a small state engine for software that has to keep several possible futures open at once. You fork the current state into branches, cheaply. Each branch carries a weight for how likely it is, constraints for what must stay true, and a deadline for when it stops mattering. Evidence thins them out, and the one that wins is promoted to become the real state.
Why the Project Exists
AI agents increasingly try several approaches before committing to one. Three plans for a refactor, two booking options, a handful of tool-call sequences. The tools they use for this were built for something else. Git worktrees and container snapshots are full copies with no idea which copy is more likely, when one should be abandoned, or what result would settle it. Keeping the alternatives in the prompt has no state at all.
The project’s view is that holding alternatives is a job for the state layer, and that it can be done with a few verbs: fork, weigh, constrain, expire, observe, promote. Underneath sits a copy-on-write map, so a branch costs what it changed. On a 10,000-key state, a branch that changes three keys takes about 4 KB, where a full copy takes 2.1 MB.
What Is Built
Version 0.1 has:
- A Go library. Stores in memory or in a single file, safe from several goroutines, with no dependencies outside the Go standard library.
- A command.
multivergencereads and changes the same file from the shell, with JSON output, so agents written in Python, TypeScript or anything else can use it today. - A file that survives crashes. Every change is one checksummed record, synced before the call returns. Promote is a single record, so a crash leaves the state before it or after it.
- A demo. An agent’s three travel plans, collapsing to one as a fare search, a disruption feed and an expired seat hold come in, with every number checked.
- Tests aimed at the promise. Isolation checked against full copies, writer processes killed mid-promote, deterministic replay, a 30-day schedule of deadlines and constraints, many processes on one file. How it was tested has the figures.
What It Leaves Out
Version 0.1 promotes one branch and drops the rest; it doesn’t merge branches. It treats a branch as data, so if a branch takes a real action, such as paying for something, that isn’t undone when the branch dies. And it runs on one machine, with one process writing a file at a time.
How the Project Works
Multivergence is open source under the Apache License 2.0. The code, the tests, the recorded test results and the documentation are on GitHub. Releases are built and checked by the project’s release workflow, and ready-built binaries for Linux, macOS and Windows are on the download page.