# Zerolang

> An experimental graph-native programming language where the semantic graph is the program database, designed for AI agents to query, patch, and prove code changes.

Zerolang is an experimental, open-source programming language built by Vercel Labs where the semantic graph — not source text — is the program database. Agents query the graph, submit checked edits via `zero patch`, and prove results, while humans review readable `.0` projection files. The project is licensed under Apache 2.0 and carries an explicit safety warning: it is experimental, expects breaking changes, and should not be run against production systems.

## What It Is

Zerolang reframes how AI coding agents interact with source code. Instead of treating text files as the source of truth and running a loop of write → check → format → build → inspect, Zerolang makes the compiler-owned graph the authoritative program representation. Agents receive explicit handles — symbols, node IDs, graph hashes, types, effects, call edges, and ownership facts — and submit structured patches that the compiler validates before any change reaches the store. The result is a tighter agent loop where stale or invalid edits fail early, reducing the guessing that characterizes traditional LLM coding workflows.

## The Graph-First Architecture

The core artifact is `zero.graph`, a checked compiler input that stores the program as a semantic graph. Key design elements include:

- **Graph hashes**: Every patch must supply the current graph hash; stale hashes are rejected before the store is written.
- **Node IDs and field targeting**: Edits target semantic nodes and fields rather than line ranges, making patches structurally precise.
- **Projection files**: Human-readable `.0` files are generated projections of the graph, available for review and occasional manual editing via `zero import` / `zero export`.
- **Compiler commands**: `zero query`, `zero inspect`, `zero check`, `zero test`, and `zero run` expose compiler facts through agent-friendly CLI commands.

## Agent Workflow and Skill System

The expected workflow is a normal conversation: a human asks for an outcome, and the agent uses the compiler rather than guessing from source text. The compiler bundles version-matched agent skills (`zero skills get agent`, `zero skills get graph`, `zero skills get language`, `zero skills get stdlib`), and an agent bootstrap skill is installable via `npx skills add vercel-labs/zerolang`. This skill-based architecture keeps agent knowledge synchronized with the compiler version.

## Runtime Goals

Despite the graph-first model, Zerolang still targets demanding runtime constraints:

- Token-efficient inspection for agent use
- Low memory usage and fast startup
- Fast builds and low runtime latency
- Explicit capabilities with zero external dependencies
- Small, dependency-free artifacts

## Update: v0.3.4

The latest release is v0.3.4, published in June 2026. The repository, created in May 2026 under the `vercel-labs` GitHub organization, is primarily written in C and has accumulated over 5,300 stars and 339 forks since launch. The project is under active development with 131 open issues, and the homepage explicitly warns users to expect breaking changes and rough edges. The primary language being C signals a focus on the low-memory, fast-startup runtime goals stated in the design.

## Features
- Graph-native program database (zero.graph)
- Checked graph patches with hash validation
- Human-readable .0 projection files
- zero patch for structured semantic edits
- zero query for graph inspection
- zero check, zero test, zero run compiler commands
- zero import / zero export for projection boundary management
- Version-matched agent skill bundles
- Token-efficient agent inspection
- Zero external runtime dependencies
- Fast startup and low memory usage
- Explicit capability and effect tracking

## Integrations
npx skills (agent bootstrap), Vercel Labs agent skills registry

## Platforms
API, CLI

## Pricing
Open Source

## Version
v0.3.4

## Links
- Website: https://zerolang.ai
- Documentation: https://zerolang.ai/getting-started
- Repository: https://github.com/vercel-labs/zerolang
- EveryDev.ai: https://www.everydev.ai/tools/zerolang
