Skip to main content
Code generation is getting cheap. Trust is the bottleneck.
X07X07

X07 is the deterministic, certifiable execution substrate for agent-written software.

X07 runs agent-written code deterministically — solve worlds, record/replay — under explicit budgets and capability sandboxes, with structured diagnostics and quickfixes, spec-first testing (XTAL), and proof-backed certification. The C backend compiles fast to small native binaries, with a wasm target.

Why X07 is opinionated

Less guesswork in the language. Less guesswork in the repair loop.

The first example is about API ambiguity. The second is about what happens when the first attempt is wrong and you need a repair loop a human reviewer can follow.

Reversing bytes should be boring

Python exposes several valid-looking ways to read stdin and manipulate bytes. X07 exposes one canonical bytes helper.

PythonSeveral plausible wrong turns
# Wrong turn 1 — text instead of bytes
import sys
data = sys.stdin.read()

# Wrong turn 2 — .reverse() does not exist on str
result = data.reverse()
# → AttributeError: 'str' has no attribute 'reverse'

# Wrong turn 3 — reversed(data) is an iterator
data = sys.stdin.buffer.read()
sys.stdout.buffer.write(reversed(data))
# → TypeError: a bytes-like object is required, not 'reversed'
X07One canonical bytes operation
; x07text: the lossless, human-readable
; projection of canonical x07AST.
{
  :kind entry
  :module_id main
  :schema_version x07.x07ast@0.8.0
  :imports (std.bytes)             ; the bytes module
  :decls ()
  :solve (std.bytes.reverse input) ; the one reverse helper
}

The X07 side is the shipped 03_reverse example, shown in x07text (round-trips to canonical x07AST JSON via x07 ast from-text). The point is not that Python cannot reverse bytes, but that X07 leaves the agent with far less API guesswork.

When the first attempt is wrong, the repair surface matters

Python gives the agent a human traceback. X07 gives it stable JSON diagnostics and deterministic repair commands.

PythonHuman traceback
Traceback (most recent call last):
  File "reverse.py", line 6, in <module>
    sys.stdout.buffer.write(reversed(data))
TypeError: a bytes-like object is required, not 'reversed'
X07Machine-readable repair loop
x07 lint --input src/main.x07.json
# -> emits x07diag JSON with:
#    stable code
#    x07AST pointer
#    optional quickfix as JSON Patch

x07 fix --input src/main.x07.json --write
# -> applies the quickfix deterministically

The X07 docs define diagnostics as machine-readable, error codes as stable, and quickfixes as deterministic JSON Patch operations.

Direct authoring

Authoring X07 directly is a bet we test, not assume

Agents and humans can write X07 directly, and the toolchain now backs that path with a text projection, behavioral docs, and suggestion-bearing diagnostics.

x07text

Lossless text projection

x07 ast to-text and x07 ast from-text round-trip between canonical x07AST JSON and a readable, writable text form, so agents and humans can author X07 directly without losing structure.

x07 doc

Behavioral API summaries

x07 doc describes what stdlib and package functions do — inputs, outputs, and effects — so authors guess less before the first compile.

Diagnostics

Did-you-mean suggestions

Near-miss identifiers come back as structured diagnostics with concrete suggestions, which keeps the first repair iteration short.

Direct authoring is an explicitly gated bet, not a settled conclusion. A comparative agent eval in the x07 repo (labs/agent-eval) decides how much deeper the language investment goes. The results will be published either way.

Deterministic execution

Programs run in solve worlds with record/replay, so the same input produces the same output, the same diagnostics, and a rerunnable trace.

Budgeted and capability-sandboxed

Explicit budgets bound how long code runs and what it allocates; capability sandboxes decide what it can touch. Agent-written code runs inside limits you set, not limits it picks.

Certifiable, not just plausible

Spec-first XTAL tests, structured diagnostics with quickfixes, and proof-backed certification produce evidence a reviewer can check instead of take on faith.