Trying Out Zero: an agent-first programming language from Vercel Labs

20.05.2026 •Stefan Welsch
Tech Artificial Intelligence CLI Developer Experience Hands-on Open source DevOps Testing

Banner

TLDR

  • Zero is an experimental open-source project from Vercel Labs: a programming language designed for AI agents from the ground up.
  • The exciting part is not just the CLI, but the language itself: a small surface area, explicit types, regular syntax, and tooling intended to provide structured facts.
  • Zero is pre-1, unstable, and explicitly not production-ready. You should only try it in isolated, disposable environments.
  • Zero is relevant for developers, DevOps teams, and AI engineers who want to understand what programming languages might look like when agents are the primary users.
  • Core features: zero check, zero run, structured diagnostics, graph and size information, a standard-library focus, and agent-friendly repair workflows.

Introduction

Today we are taking a look at Zero, an experimental project from Vercel Labs. The short description in the repository is quite direct: “The programming language for agents.” At first, that sounds like AI hype, but technically it raises an interesting question: What actually happens when a programming language is not designed primarily for humans, but for agents that are supposed to read, modify, check, and repair code?

One important point right up front: Zero is pre-1, intentionally unstable, and not intended for production. The project description also clearly states that security vulnerabilities are to be expected and that Zero should not be used with sensitive data or trusted infrastructure. So please do not get the idea of rewriting your payment service with it tomorrow.

Still, Zero is exciting because it makes a few design decisions visible that are also relevant for today’s toolchains: explicit language elements instead of syntactic magic, structured outputs for diagnostics and graphs, a broad standard library, and workflows that are scriptable from the start. That is why this article is not just about zero check or zero run, but above all about how the language feels and why this regularity can be helpful for agents.

The project positions itself very clearly as an experiment in the direction of an agent-first programming language. That framing is exactly what matters: this is not about building yet another general-purpose language with nice syntax, but about the question of what properties code should have if AI systems are supposed to understand and modify it reliably.

Background

Why a language for agents?

When we work with coding agents today, we quickly run into familiar problems. An agent may be able to generate code, but it still has to reconstruct a lot of implicit knowledge: project structure, build system, dependency management, framework conventions, test commands, linting rules, and sometimes even team-specific patterns.

Zero goes one level deeper here. Instead of just building better prompts for existing languages, the project asks: What would a language have to look like if agents were the primary users?

A few goals can be derived from the README:

  • Agent-first learnability: The language should be small and regular enough that agents can learn it quickly from examples, docs, and compiler feedback.
  • Standard-library depth: Common capabilities should live in documented, coherent APIs instead of immediately triggering a dependency search.
  • Deterministic tooling: Diagnostics, graph facts, size reports, and fix plans should be structured enough that agents can evaluate them programmatically.
  • Direct developer experience: Checking, running, formatting, inspecting, and repairing should be fast and scriptable.
  • Regularity over syntax: Better an obvious, explicit style than several clever shorthand forms.

That last point in particular is important. Many languages optimize heavily for human ergonomics: fewer characters, syntactic sugar, framework magic. That is not always ideal for agents. An agent often benefits more from regularity, explicit types, and machine-readable feedback than from especially elegant syntax.

Pre-1 means: inspect it, do not plan around it

Zero is explicitly an experiment. The syntax and APIs may change, and that is exactly what makes sense for a project like this. If a language is still trying to figure out which patterns really work for agents, it should not be stabilized too early.

For us as developers, that means we can use Zero very well as a learning object. We can look at which tooling ideas are being tried out there, what structured output can look like, and how a deliberately small language surface feels. For productive workloads, sensitive data, or trusted infrastructure, however, Zero is currently not suitable.

Main features

The language: explicit, small, and regular

The special thing about Zero is not that it brings yet another new CLI. We have enough of those. More interesting is the idea that the language itself should be as easy as possible to learn and repair programmatically.

In practice, that means programs consist of clearly recognizable building blocks such as packages, structs, functions, control flow, and explicit return types. Instead of heavily implicit framework conventions, code should be written in a way that an agent can analyze directly.

A small example of the style:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
package shop.orders

struct OrderLine {
  sku: String
  quantity: Int
  unit_price_cents: Int
}

fn line_total_cents(line: OrderLine) -> Int {
  return line.quantity * line.unit_price_cents
}

This is not spectacular, but that is exactly the point. An agent does not have to guess what line_total_cents returns. It sees the input, the return type, and the field accesses. The less implicit things are, the easier it is to derive diagnostics, refactorings, and fix plans.

Of course, because Zero is pre-1, you should not treat the concrete syntax as final. What matters here above all is the feel of the language and the design direction.

Tooling as part of the language design

Zero comes with the commands you would expect from modern languages: checking, running, building. But the structured analysis commands such as graph --json, size --json, or doctor --json are especially interesting.

The idea behind them is agent-friendly: an agent should not first have to parse terminal text that was formatted for humans. It should receive structured facts, derive a decision from them, and then modify code in a targeted way.

The Quick Start in the repository shows the first steps with installation, zero --version, zero check, and zero run. At first glance, these commands look normal, but in combination with the JSON outputs they create a tooling model that integrates well into automated repair and analysis loops.

Hands-On

Ok, let’s look at Zero in practice. The focus here is deliberately on a small program in the language itself. We use the CLI only as the tool around it.

Our scenario: a very small e-commerce order service module. It calculates the total price of an order, including shipping logic. The example is intentionally manageable, but realistic enough to show structs, functions, control flow, lists, and a main program.

Setup in an isolated environment

Since Zero is not production-ready, I would try it locally in a separate dev container, a VM, or at least in a disposable directory.

Installation according to the project README:

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

After that, you can check and run a program:

1
2
zero check examples/hello.0
zero run examples/add.0

The expected example output from the README is:

1
math works

For our own example, we create this structure:

1
2
mkdir -p zero-order-demo/examples zero-order-demo/tests zero-order-demo/tools
cd zero-order-demo

The order service program in Zero

Now comes the most important part: the code in Zero itself. Create the file examples/order_service.0.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package shop.orders

struct OrderLine {
  sku: String
  quantity: Int
  unit_price_cents: Int
}

struct Order {
  id: String
  country: String
  lines: List<OrderLine>
}

fn line_total_cents(line: OrderLine) -> Int {
  return line.quantity * line.unit_price_cents
}

fn shipping_cents(country: String, subtotal_cents: Int) -> Int {
  if subtotal_cents >= 10000 {
    return 0
  }

  if country == "CH" {
    return 900
  }

  return 1500
}

fn order_total_cents(order: Order) -> Int {
  let subtotal_cents = 0

  for line in order.lines {
    subtotal_cents = subtotal_cents + line_total_cents(line)
  }

  return subtotal_cents + shipping_cents(order.country, subtotal_cents)
}

fn main() {
  let order = Order {
    id: "ord-1001",
    country: "CH",
    lines: [
      OrderLine { sku: "keyboard", quantity: 1, unit_price_cents: 12900 },
      OrderLine { sku: "usb-cable", quantity: 2, unit_price_cents: 1900 }
    ]
  }

  let total_cents = order_total_cents(order)
  print("order_id=" + order.id)
  print("total_cents=" + to_string(total_cents))
}

Let’s briefly walk through the language elements.

The package at the beginning gives the code a namespace:

1
package shop.orders

That is helpful for agents because a module is not just a filename, but has an explicit affiliation. In larger codebases, a tool can derive graph facts from that.

After that, we define data structures:

1
2
3
4
5
struct OrderLine {
  sku: String
  quantity: Int
  unit_price_cents: Int
}

The fields are explicitly typed. No reflection magic, no hidden schema, no implicit JSON mapping. An agent can immediately recognize: an OrderLine has an SKU, a quantity, and a price in cents.

The function signature is also very direct:

1
2
3
fn line_total_cents(line: OrderLine) -> Int {
  return line.quantity * line.unit_price_cents
}

What matters here is the return type Int. For humans, that may seem trivial. For agents, however, it is valuable because repairs can be narrowed down more effectively. If an agent later changes line_total_cents and suddenly returns a string, a checker can object very specifically.

The shipping logic shows normal control flow:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fn shipping_cents(country: String, subtotal_cents: Int) -> Int {
  if subtotal_cents >= 10000 {
    return 0
  }

  if country == "CH" {
    return 900
  }

  return 1500
}

Here you can see the regularity: condition, block, return. No implicit fallthrough magic. No hidden DSL. This simplicity is exactly what agent-first design is aiming for.

Checking the program

With the Zero CLI installed, you can check the program like this:

1
zero check examples/order_service.0

If the syntax matches the installed Zero version, the checker should return without errors. If not, that is not entirely surprising for a pre-1 project. In that case, the structured diagnostic output is exactly what becomes interesting: Which location is being flagged? Is the error machine-readable enough that an agent could repair it?

Typical commands from the repository are:

1
2
3
4
5
6
7
zero check examples/hello.0
zero run examples/add.0
zero build --emit exe --target linux-musl-x64 examples/add.0 --out .zero/out/add
zero graph --json examples/systems-package
zero size --json examples/point.0
zero skills get zero --full
zero doctor --json

Especially interesting here are graph --json, size --json, skills get, and doctor --json, because they go beyond pure compilation. They show that Zero understands tooling not just as developer convenience, but as part of the language design for agents.

Running the program

If zero check succeeds, you can run the example:

1
zero run examples/order_service.0

Expected output for our example:

1
2
order_id=ord-1001
total_cents=16700

Why 16700? The order contains:

  • 1 × keyboard at 12900 cents
  • 2 × USB cable at 1900 cents each

That gives:

1
12900 + 2 * 1900 = 16700

Because the subtotal is above 10000 cents, shipping is free. So the total price remains 16700.

Deriving facts from the language structure

A core point of Zero is that tooling should provide structured facts. The official tooling offers zero graph --json for that, among other things.

For our example, we can recreate the principle with a small Python script. This is not meant as a replacement for Zero, but as an illustration: the more regular the language is, the easier it is to extract facts.

Create tools/zero_facts.py:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
from pathlib import Path
import json
import re

source = Path("examples/order_service.0").read_text()

facts = {
    "package": re.search(r"package\s+([a-zA-Z0-9_.]+)", source).group(1),
    "structs": re.findall(r"struct\s+([A-Za-z0-9_]+)", source),
    "functions": re.findall(r"fn\s+([a-z_]+)\(", source),
    "prints": re.findall(r'print\("([^"]+)"', source),
}

print(json.dumps(facts, indent=2, sort_keys=True))

Run it:

1
python tools/zero_facts.py

Terminal 2

The output shows a small structured view of our program: package, structs, functions, and print outputs. That is exactly the direction Zero is aiming for with the official JSON commands, only of course much cleaner and more semantic than our regex toy.

Contract tests for the example

Since Zero is pre-1, I also want to show a small executable test harness that verifies our example file. This is not the actual Zero compiler. But it helps check the blog code reproducibly and makes visible which properties we expect from the language example.

Create tests/test_order_service_contract.py:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from pathlib import Path
import re

SOURCE = Path("examples/order_service.0").read_text()


def normalized_signatures():
    signatures = re.findall(r"fn\s+([a-z_]+)\((.*?)\)\s*->\s*([A-Za-z0-9_<>, ]+)", SOURCE, re.S)
    return [(name, " ".join(args.split()), ret.strip()) for name, args, ret in signatures]


def test_public_functions_are_explicitly_typed():
    signatures = normalized_signatures()
    assert ("line_total_cents", "line: OrderLine", "Int") in signatures
    assert ("shipping_cents", "country: String, subtotal_cents: Int", "Int") in signatures
    assert ("order_total_cents", "order: Order", "Int") in signatures


def test_order_example_calculates_expected_total():
    prices = [int(value) for value in re.findall(r"unit_price_cents:\s*(\d+)", SOURCE)]
    quantities = [int(value) for value in re.findall(r"quantity:\s*(\d+)", SOURCE)]
    subtotal = sum(quantity * price for quantity, price in zip(quantities, prices))
    shipping = 0 if subtotal >= 10000 else 900
    assert subtotal == 16700
    assert subtotal + shipping == 16700


def test_program_uses_regular_agent_friendly_constructs():
    assert "struct OrderLine" in SOURCE
    assert "struct Order" in SOURCE
    assert "for line in order.lines" in SOURCE
    assert 'print("total_cents="' in SOURCE

Then install pytest and run the tests:

1
2
pip install -q pytest
python -m pytest -q

Terminal 1

As the terminal output shows, all contract tests run successfully. They verify three things: the functions are explicitly typed, the example calculation produces the expected total price, and the code uses the central language constructs we discussed in the article.

What would an agent do with this?

The interesting thought here is not that a Python regex test is particularly great. What is interesting is the workflow that Zero wants to support systematically.

For example, an agent could:

  1. Run zero check examples/order_service.0.
  2. Read structured diagnostics if there are errors.
  3. Use zero graph --json to determine dependencies and affected functions.
  4. Change only the relevant function, for example shipping_cents.
  5. Run zero check and tests again.
  6. Generate a fix plan or an explanation.

At first glance, that sounds similar to today’s agent workflows with TypeScript, Go, or Rust. The difference lies in the design goal: Zero tries to shape the language and tooling from the start so that this loop requires as little guessing as possible.

Example change: adjusting the shipping rule

Let’s assume Product Management wants free shipping only from 20000 cents onward. In our Zero code, only this part changes:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
fn shipping_cents(country: String, subtotal_cents: Int) -> Int {
  if subtotal_cents >= 20000 {
    return 0
  }

  if country == "CH" {
    return 900
  }

  return 1500
}

For our example order, the total price would then be:

1
16700 + 900 = 17600

So an agent would not need to understand the entire program, only:

  • Which function encapsulates shipping logic?
  • What inputs and outputs does it have?
  • Which tests or facts depend on it?
  • Which expected values change?

Exactly this kind of local, structured change is a good fit for explicit language elements and deterministic tooling.

Build and native targets

According to the README, Zero also comes with a build command:

1
zero build --emit exe --target linux-musl-x64 examples/order_service.0 --out .zero/out/order-service

That is interesting for DevOps teams because native artifacts can fit more easily into containers, CI/CD pipelines, or isolated test environments. With Zero, however, I would still treat this as an experiment for now. Pre-1 means: toolchain, targets, and runtime behavior can change.

For CI, once Zero is more stable, you could roughly think along these lines:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
name: zero-order-service

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install Zero
        run: |
          curl -fsSL https://zerolang.ai/install.sh | bash
          echo "$HOME/.zero/bin" >> "$GITHUB_PATH"
      - name: Check Zero program
        run: zero check examples/order_service.0
      - name: Inspect graph
        run: zero graph --json examples/order_service.0

This is not a production recipe yet, but rather an outlook. Precisely because of the security warning in the project, you should use such install scripts and experimental toolchains in CI only in a very controlled way.

Conclusion

Zero is currently less a language you should use productively right away and more an exciting look at what programming languages for AI agents could look like. The focus on regularity, explicit types, structured diagnostics, and scriptable tooling makes sense. Especially when agents are supposed to not only write code but also debug, explain, and repair it, this machine readability becomes important.

My personal assessment: right now, Zero is a good tool for observing and experimenting, not for planning around. If you work on developer experience, AI-assisted development, or tooling, the repository is worth a look. But use it in isolation, expect breaking changes, and treat the syntax as ongoing research rather than something you need to learn by heart today.

This techup has been translated automatically by ChatGPT

Stefan Welsch

Stefan Welsch – Pionier, Stuntman, Mentor. Als Gründer von b-nova ist Stefan immer auf der Suche nach neuen und vielversprechenden Entwicklungsfeldern. Er ist durch und durch Pragmatiker und schreibt daher auch am liebsten Beiträge die sich möglichst nahe an 'real-world' Szenarien anlehnen.