zerolang README

The project's README from github.com/vercel-labs/zerolang. As one markdown file: README.md.

Zerolang

The programming language for agents.

Zerolang is an experimental graph-native programming language where the semantic graph is the program database. Humans ask for outcomes. Agents query the graph, submit checked edits, and prove the result.

Safety warning

Zerolang is experimental. Expect breaking changes, rough edges, and security issues. Run it in isolated workspaces, not against production systems or sensitive data.

Start With a Request

The expected workflow is a normal conversation:

build hello world for zerolang

The agent should use the compiler, not guess from source text:

zero init
zero patch --op 'addMain' --op 'addCheckWrite fn="main" text="hello from zero\n"'
zero run

The result is still reviewable as a text projection:

pub fn main(world: World) -> Void raises {
    check world.out.write("hello from zero\n")
}

That .0 file is a projection of zero.graph. Humans can read it, review it, and occasionally edit it. Agents should normally keep using zero query and zero patch.

The Program Database

Traditional agent coding loops treat text as the source of truth:

flowchart LR
    A[agent writes text] --> B[check]
    B --> C[format]
    C --> D[build]
    D --> E[inspect failures]
    E --> A

Zerolang moves the agent closer to the compiler:

flowchart LR
    A[agent queries graph] --> B[agent submits checked patch]
    B --> C{compiler accepts?}
    C -- invalid or stale --> A
    C -- valid --> D[agent runs task validation]
    D --> E[human reviews projection when useful]

The graph gives agents explicit handles: symbols, node IDs, graph hashes, types, effects, ownership facts, capabilities, imports, call edges, and target facts. Edits can target semantic structure instead of line ranges. Stale graph hashes, unexpected field values, invalid shapes, and type errors fail before the store is written.

What Exists Today

Install

Install the compiler:

curl -fsSL https://zerolang.ai/install.sh | bash
export PATH="$HOME/.zero/bin:$PATH"
zero --version

Install the agent bootstrap skill:

npx skills add vercel-labs/zerolang

The compiler bundles version-matched skills for agents:

zero skills
zero skills get agent
zero skills get graph
zero skills get language
zero skills get stdlib

Daily Loop

For most package work:

zero query
zero patch --op help
zero patch --op 'addMain'
zero check
zero test
zero run -- <args>

The default input is the current directory. Use . only when you want to be explicit.

When a human wants to review projection text:

zero export
zero verify-projection

When a human intentionally edits a projection:

zero import
zero check

Runtime Goals

The graph-first model should reduce agent guessing without relaxing the runtime goals:

Developing Zerolang

Build the local compiler:

pnpm install
make -C native/zero-c
bin/zero --version

Useful checks:

pnpm run docs:build
pnpm run conformance
pnpm run native:test
pnpm run command-contracts

For local iteration:

pnpm run conformance:local -- --list
pnpm run conformance:local -- --shard 1/4
pnpm run command-contracts:local

Read the docs at zerolang.ai.

zerolang (vercel-labs/zerolang)

Searching Database…

What is this?Zerolang is an experimental graph-native programming language built for AI coding agents: instead of editing raw source text, agents query a semantic graph (zero.graph), submit checked edits, and the compiler verifies the result before anything is written.
Is this a full programming language, or a tool that sits on top of an existing language?It is a standalone language with its own compiler and 'zero' CLI. The checked compiler input is zero.graph, while the human-readable .0 text files are just projections of that graph, not the normal authoring surface.
How do I install it and start using it?Install the zero compiler and the agent bootstrap skill (the compiler bundles version-matched skills for agents), then run commands like zero query, zero check, or zero patch against a directory — the current directory is the default target.
Do I need anything special to build or run it, like a specific Node version?The published compiler is a standalone artifact, but building Zerolang itself from source requires Node.js 24 or newer according to the project's engines field.
Is this safe to run on my real codebase?No — the README explicitly warns it's experimental, with breaking changes, rough edges, and security issues, and says to run it only in isolated workspaces, never against production systems or sensitive data.
Who is actually meant to write code in Zerolang — humans or agents?Agents are the primary authors, using zero query and zero patch to work directly against the graph; humans mainly read, review, and occasionally edit the reviewable .0 text projection.
What commands does the zero CLI expose?It provides zero query, zero inspect, zero check, zero test, and zero run to expose compiler facts, plus zero patch for checked graph edits and zero import/export to move between the graph and .0 text projections.
Why build a whole new language instead of letting agents edit source text directly?Traditional agent coding loops treat text as the source of truth, forcing agents to guess structure from strings. Zerolang gives agents explicit handles — symbols, node IDs, hashes, types, effects, ownership, and capabilities — so edits target semantic structure instead of line ranges.
What happens if an agent tries to apply a stale or invalid edit?zero patch rejects it: stale graph hashes, unexpected field values, invalid shapes, and type errors all fail before anything is written to the store.
What performance goals does Zerolang aim for?It targets token-efficient inspection, low memory use, fast startup and builds, low runtime latency, explicit capabilities, and small, dependency-free artifacts.
What are similar projects?qwen-code, fixing-smartass-opus-5, Tov, openrig, acryl, cf, Odin, git-ai
Size
73.2 MB
Stars
5.4K
Age
5mo
Commits · 90 Days