Zero
Zero is an agent-first programming language experiment designed to be easy for AI agents to write, inspect, and repair through explicit capabilities and structured, deterministic diagnostic tooling.
Zero is an experimental, agent-first programming language designed to optimize for how autonomous agents interact with, write, and repair code. Developed as an open-source project by Vercel Labs, Zero prioritizes explicit capabilities, regularity, and inspectability over traditional language features like hidden globals or magic syntax. By making language primitives and API interactions deterministic and explicit, the design aims to ensure that most programming tasks have one clear, predictable path, reducing the guesswork often required during automated code generation.
Functionality of the language centers on capability-based design. Programs interact with their environment through explicitly passed objects, such as a 'World' capability, rather than relying on ambient global process states. The compiler emphasizes structured output, providing diagnostics, repair plans, and architectural graphs as native data formats that agents can parse to understand build errors and plan automated fixes. Its type system and standard library are intentionally kept lightweight and pay-as-used, ensuring that programs remain small and their dependencies visible.
Some of the key features are:
- Agent-First Design: Syntax and tooling are optimized for automated consumption, diagnostic inspection, and programmatic repair cycles.
- Explicit Capabilities: Programs require explicit capability objects for outside-world access, making side effects and resource usage visible at the type level.
- Deterministic Tooling: The compiler provides structured diagnostic data and repair metadata, allowing tools to plan and execute code fixes reliably.
- Small Surface Area: The language favors regular syntax and minimal special cases, making it easier for agents to learn the language while actively working.
- Standard Library First: Focuses on broad, consistent documented APIs rather than package selection to reduce dependency overhead.
- No Legacy Promises: Allows for breaking changes and design iterations to ensure the language evolves to best serve agent requirements.
- Static Monomorphization: Uses explicit type and static parameters to generate direct, concrete code paths without hidden vtables, reflection, or method registries.
Operationally, Zero uses a command-line interface to check, build, and test projects. Developers install the compiler via a script, and manage projects using a 'zero.json' manifest that defines package targets. The compiler supports multiple build profiles, including 'tiny' and 'small' modes, which help keep final artifacts lean for deployment. During development, the language's 'check' and 'explain' commands allow humans and agents to iterate on code by providing actionable diagnostics and repair plans. Since it is currently a pre-1 experimental project, it is recommended for use in isolated, non-production environments.
Some common use cases include:
- Agent-Driven Development: Building systems where autonomous agents write, test, and automatically patch application code.
- CLI Development: Creating compact, native-executable command-line tools that rely on specific, documented standard library capabilities.
- Systems Programming: Developing performant, small-footprint software that avoids hidden runtime overhead and relies on direct emission.
- Automated Refactoring: Utilizing structured JSON diagnostics to build CI/CD pipelines that automatically resolve common coding errors.
Comments
0Markdown is supported.