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…

这是什么?Zerolang 是一种实验性的图原生编程语言,专为 AI 编程代理打造:代理不直接编辑原始源代码文本,而是查询语义图(zero.graph)、提交经过检查的编辑,编译器会先验证结果,然后才会写入任何内容。
这是一门完整的编程语言,还是一个构建在现有语言之上的工具?它是一门独立的语言,拥有自己的编译器和 'zero' 命令行工具。经过检查的编译器输入是 zero.graph,而人类可读的 .0 文本文件只是该图的投影,并非常规的编写界面。
我该如何安装并开始使用?安装 zero 编译器和代理引导技能(编译器内置了与版本匹配的代理技能),然后针对某个目录运行 zero query、zero check 或 zero patch 等命令,默认目标为当前目录。
构建或运行它需要什么特殊条件吗,比如特定的 Node 版本?已发布的编译器是独立的成品文件,但根据项目 engines 字段的要求,从源代码构建 Zerolang 本身需要 Node.js 24 或更高版本。
在我的真实代码库上运行它安全吗?不安全。README 明确警告它处于实验阶段,存在破坏性变更、粗糙之处和安全问题,并建议仅在隔离的工作区中运行,切勿用于生产系统或敏感数据。
到底是人在用 Zerolang 写代码,还是代理?代理是主要的编写者,它们使用 zero query 和 zero patch 直接对图进行操作;人类主要负责阅读、审查,偶尔编辑可供审查的 .0 文本投影。
zero 命令行工具提供哪些命令?它提供 zero query、zero inspect、zero check、zero test 和 zero run 来展示编译器信息,另提供用于经过检查的图编辑的 zero patch,以及在图与 .0 文本投影之间转换的 zero import/export。
为什么要另外设计一门新语言,而不是让代理直接编辑源代码文本?传统的代理编程流程把文本视为唯一的真实来源,迫使代理从字符串中猜测结构。Zerolang 为代理提供了明确的句柄,包括符号、节点 ID、哈希、类型、效应、所有权和能力,使编辑直接针对语义结构,而不是行号范围。
如果代理尝试应用过时或无效的编辑会怎样?zero patch 会拒绝它:过时的图哈希、意外的字段值、无效的结构以及类型错误都会在任何内容写入存储之前失败。
Zerolang 追求哪些性能目标?它的目标是:节省 token 的检查方式、低内存占用、快速启动和构建、低运行时延迟、明确的能力声明,以及体积小、无依赖的产物。
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