The programming language
for agents
zerolang is an experimental graph-first programming language where agents work with semantic program structure instead of raw source text.
$ curl -fsSL https://zerolang.ai/install.sh | bashExpect breaking changes. Run it in a safe environment, not against production systems.
Semantic edit surface
Agents can inspect checked ProgramGraph facts and submit graph edits instead of only patching source text ranges.
Human-readable storage
.0 source stays the durable representation: reviewable, auditable, formatted, and regular enough to behave like program data.
Tight runtime goals
Token efficiency, low memory usage, fast startup, fast builds, low runtime latency, and zero dependencies remain design constraints.
Why graph
Source is the artifact.
The graph is the work surface.
Source text is good for humans and review, but it is a weak interface for program understanding. Agents need to gather focused context, know what a call resolves to, avoid stale edits, change related structure, and get validation before source is written.
Semantic navigation
Agents should be able to start from a symbol, diagnostic, call, capability, module, or node ID and gather the relevant semantic slice without reading the whole file.
Precise edits
Graph edits target compiler nodes and fields, with graph-hash and expected-value checks, instead of relying only on line ranges or matching source text.
Validated refactors
Refactors can be represented as operations on resolved program structure: rename this function node, replace this resolved callee, update these related references.
Shorter feedback loop
A graph patch can validate, lower, write, format, reparse, and check through the compiler instead of leaving agents to chain text edits and cleanup commands.
fn answer() -> i32 {
return 40 + 2
}
pub fn main(world: World) -> Void raises {
if answer() == 42 {
check world.out.write("math works\n")
}
}zero-graph v1
origin source-text
module "hello"
hash "graph:b8a019041020df03"
node #ea5ea1ca Function name:"main" type:"Void" public:true fallible:true
node #f9ce8b3e Param name:"world" type:"World"
node #421a4d4b MethodCall name:"write" type:"Void"
node #610c78bf Literal type:"String" value:"hello from zero\n"
edge #421a4d4b arg #610c78bf order:0zero graph patch examples/hello.0 \
--expect-graph-hash graph:b8a019041020df03 \
--op 'set node="#610c78bf" field="value" expect="hello from zero\n" value="hello graph\n"'Direction
Source as data. Graph as interface.
The language is still designed under systems constraints: token efficiency, low memory usage, fast startup, fast builds, low runtime latency, and zero dependencies. The graph work does not replace readable source; it gives agents a checked structure and a tighter write, validate, check, and format loop.
Experimental by design
Today's syntax and APIs are not a contract. Breaking changes and removed compatibility paths are expected when a clearer agent-facing design wins.
Safe environments only
Security vulnerabilities should be expected. Run and develop zerolang in isolated environments, not production systems or sensitive infrastructure.
Source-backed graph
The ProgramGraph is derived from source. Graph artifacts are inspection and interchange data, not the primary project files.
Checked graph edits
Graph patches can target semantic nodes with graph-hash and field-value preconditions before source is written.
Semantic facts
The compiler can expose node IDs, resolved types, effects, ownership facts, capabilities, helper use, and module edges.
Regular source
The syntax should stay boring enough to index, compare, format, audit, and regenerate while still reading like normal code.
Version-matched skills
The compiler ships language, graph, diagnostics, build, testing, package, and stdlib guides that match the binary in use.
Explicit effects
Outside-world access, fallibility, ownership, and resource use should stay visible to both readers and tools.
Direct CLI surface
Agents can use compiler commands for checks, graph inspection, patching, size reports, explanations, and repair plans.
Explore with us.
Install the compiler, run an example, inspect the graph, and test the edit loop. The most useful feedback is what helps agents work with less guessing.