Vox Programming Language
The AI-Native Programming Language
One language. Database, backend, UI, and agent tools — designed first as a target for large language models, and for the developers who work alongside them.
“Is it a fact — or have I dreamt it — that, by means of electricity, the world of matter has become a great nerve, vibrating thousands of miles in a breathless point of time? Rather, the round globe is a vast head, a brain, instinct with intelligence!”
— Nathaniel Hawthorne, The House of the Seven Gables (1851)
The Architecture: Designed for AI and Humans
Programming languages predate LLMs by decades. JavaScript's dynamic typing fails silently at runtime, C++'s pointer mutation hides state, and Python's configuration layers run deep. While human developers manage these trade-offs, for an AI agent navigating them simultaneously, they compound into hallucination.
A million-token context window sounds generous until the signal is buried in boilerplate1. Decades of patching the object-relational impedance mismatch2 have ballooned the accidental complexity3 and technical debt of modern systems4, leaving codebases too brittle for agents to safely refactor.
The Architecture: Designed for AI and Humans
Programming languages predate LLMs by decades. JavaScript's dynamic typing fails silently at runtime, C++'s pointer mutation hides state, and Python's configuration layers run deep. While human developers manage these trade-offs, for an AI agent navigating them simultaneously, they compound into hallucination.
A million-token context window sounds generous until the signal is buried in boilerplate1. Decades of patching the object-relational impedance mismatch2 have ballooned the accidental complexity3 and technical debt of modern systems4, leaving codebases too brittle for agents to safely refactor.
Platform Architecture & Stability
Stability is stratified by model predictability. Core surfaces (data, logic, memory) lock first; rendering surfaces remain fluid.
Stability Tiers
- 🟢 Stable — rules locked; LLM output is deterministic.
- 🟡 Preview — functionally complete; execution pipelines still optimizing.
- 🚧 Experimental — under active design; not deployable.
Domain Matrix
| Domain & Purpose | What It Manages | Tier Status & Impact | Verification Pipeline |
|---|---|---|---|
| Core Syntax & Engine Language foundation. | AST, type safety, compiler directives, LSP. | 🟢 Stable Syntax rules are locked; generation is highly predictable. | Golden parsing suite, typed AST validations. |
| Data & Connectivity How data is saved and shared. | @table auto-migrations, @query/@server endpoints, HTTP payloads. | 🟢 Stable API contracts are functionally complete. | In-memory DB roundtrips, strict schema testing. |
| Agent Tooling System AI access to external actions. | Orchestration logic, @mcp.tool exposure, telemetry. | 🟢 Stable Complete Model Context Protocol compliance is established. | MCP protocol assertions, telemetry gate checks. |
| RAG & Knowledge Curation Memory for autonomous research. | vox scientia pipeline, Hallucination Guards (Socrates). | 🟡 Preview Retrieval heuristics and Socrates guard policies are actively evolving. | Citation alignment checks, novelty discovery scans. |
| Durable Execution Multi-step tasks and continuity. | State survival via workflow and actor models. | 🟡 Preview State preservation lifecycles may undergo optimization. | Durability integrity sweeps, zero-placeholder enforcement. |
| Hardware & Tuning (MENS) Local AI training and inference. | vox populi GPU mesh, adapter training, audio inference. | 🟡 Preview Hardware-dependent support mappings are expanding. | Local hardware discovery tests, ML pipeline sweeps. |
| Web UI & Rendering What the user sees. | @island browser wiring, React generation, UI routing. | 🟡 Preview Client-side projections and web component translation may shift. | WebIR constraints, deterministic generation audits. |
| Distributed Node Mesh Cross-machine coordination. | Cross-machine inference routing, agent task distribution. | 🚧 Experimental Still under active design; not ready for deployment. | Pending standardizations. |
(v0.4, April 2026)
Pillar 1: The Single Source of Truth
Agents require a single source of truth. A core concept like a Task no longer needs to be defined three times across SQL, the backend API, and the client. The @table primitive collapses schema and interface into one AST node.
#![allow(unused)] fn main() { // [ @table ] // Auto-generates SQL and gracefully handles schema migrations. @table type Task { title: str done: bool priority: int owner: str } // [ @index ] // The database index, declared inline next to the type. @index Task.by_owner on (owner) }
Pillar 2: Compile-Time Determinism
Agents ignore edge cases. By eliminating hidden exceptions in favor of a strict Result[T] type, Vox makes unhandled errors a compile-time failure, granting immediate syntax-level feedback before broken code executes.
#![allow(unused)] fn main() { // [ @query ] // Read-only endpoint; Vox strictly enforces that it never mutates data. // Becomes a GET /api/query/recent_tasks endpoint automatically. @query fn recent_tasks() to list[Task] { ret db.Task .where({ done: false }) .order_by("priority", "desc") .limit(10) } // [ Result[Task] ] // Forces every caller to handle both success and error branches. // The compiler will not build code that ignores an error. @server fn get_task(id: Id[Task]) to Result[Task] { let row = db.Task.find(id) match row { Some(t) -> Ok(t) // Task found: return it None -> Error("not found") // Task missing: return an error } } // [ @mutation ] // Auto-transacted write; automatically rolls back on network or logic failure. @mutation fn add_task(title: str, owner: str) to Id[Task] { ret db.insert(Task, { title: title, done: false, priority: 0, owner: owner }) } }
Pillar 3: Strict Network Boundaries (Web UI)
WebIR restricts interactive state to explicit boundaries (@island), protecting the agent's context window. The compiler natively implements the "Islands Architecture"6 without exposing React hooks or lifecycle waterfalls inside the .vox source file.
#![allow(unused)] fn main() { // [ @island ] // Marks the browser boundary. The compiler generates the React component, // lifecycle wiring, and typed client stub. None of it appears in the .vox source. @island TaskList { tasks: list[Task] // Same Task type from Pillar 1 on_complete: fn(str) -> Unit // A callback the browser can easily trigger } // [ component ] // Server-rendered execution: fast initial load, written entirely in Vox syntax. // React's hooks and lifecycles are strictly confined to the generated layer. component TaskPage() { view: ( <div className="task-list"> <TaskList tasks=[...] on_complete={complete_task} /> </div> ) } // [ routes ] // Safely maps the URL directly to the statically verifiable component. routes { "/" to TaskPage } }
v0.dev integration:
vox island generate TaskDashboard "A minimal sidebar dashboard"calls the v0.dev API (requiresV0_API_KEY) and writes the generated component intoislands/src/TaskDashboard/. The@v0build hook triggers this automatically duringvox build.
Pillar 4: Durable State & Agent Interoperability
Multi-agent pipelines crash, and external tools fail. By integrating durable execution7 and the "let it crash" actor model8, a workflow guarantees state survival automatically.
The @mcp.tool decorator projects these hardened native functions directly to Anthropic's Model Context Protocol (MCP)5 for external tool use.9
|
|
Pillar 5: Solving the Training Paradox
Legacy languages saturate the internet's training data. To catch up, vox populi and the MENS pipeline allow you to locally fine-tune foundation models natively on Vox's structural boundaries, bridging the data gap using Rust-accelerated pipelines.
More: examples/golden/ · Rosetta comparison (C++, Rust, Python)
The Language, Step by Step
Step 1 — Declare your data model once
// vox:skip
@require(len(self.title) > 0)
@table type Task {
title: str
done: bool
priority: int
owner: str
}
@index Task.by_owner on (owner)
@index Task.by_priority on (priority, done)
@require is a compiler-enforced precondition on the type itself. @index emits DDL alongside the table migration.
Step 2 — Add server logic and queries
// vox:skip
@mutation
fn add_task(title: str, owner: str) to Id[Task] {
ret db.insert(Task, { title: title, done: false, priority: 0, owner: owner })
}
@server fn complete_task(id: Id[Task]) to Result[Unit] {
db.Task.delete(id)
ret Ok(Unit)
}
@query
fn recent_incomplete_tasks() to List[Task] {
ret db.Task.where({ done: false }).order_by("priority", "desc").limit(10)
}
Step 3 — Build the UI in the same language
Vox generates the network call, serialization, and cross-boundary types — no fetch wrapper, no client SDK:
// vox:skip
import react.use_state
@island
fn TaskList(tasks: List[Task]) to Element {
let (items, set_items) = use_state(tasks)
<div class="task-list">
{items.map(fn(task) {
<div class="task-row">
<input
type="checkbox"
checked={task.done}
onChange={fn(_e) complete_task(task.id)}
/>
<span>{task.title}</span>
</div>
})}
</div>
}
Step 4 — Handle absence and failure explicitly
// vox:skip
@server fn get_task(id: Id[Task]) to Result[Task] {
let row = db.Task.find(id)
match row {
Some(t) -> Ok(t)
None -> Error("task not found")
}
}
Step 5 — Add durable workflows and stateful actors
// vox:skip
workflow checkout(amount: int) to str {
let result = charge_card(amount)
match result {
Ok(tx) -> "Success: " + tx
Error(msg) -> "Failed: " + msg
}
}
Step 6 — Expose functions as AI tools
// vox:skip
@mcp.tool "Search the knowledge base for documents matching the query"
fn search_knowledge(query: str, max_results: int) to SearchResult {
Found("Result for: " + query, 95)
}
Agent Orchestration & AI Capabilities
Vox goes beyond just syntax. It includes a full AI ecosystem built directly into the toolchain:
- Multi-Agent Coordination: The DEI orchestrator (
vox-dei) routes concurrent tasks by file affinity and role. Every state transition is persisted and traceable. - Agent-to-Agent Messaging: Agents exchange typed, JWE-encrypted envelopes over a structured bus, ensuring compile-time shape guarantees for AI interactions.
- Local GPU & Native Training (MENS): The MENS neural pipeline natively equips developers to fine-tune models using Burn and Candle. No Python required.
vox populi probeorchestrates:- QLoRA Fine-Tuning against your internal repositories.
- Speech-to-Code (ASR) via local Whisper/Qwen to map vocal commands to AST edits.
- Local Mesh Serving securely exposing models over a
/v1/completionsendpoint for offline execution.
Documentation Structure
Vox uses the Diátaxis framework to organize knowledge by user intent.
Learning Oriented
Tutorials
Step-by-step lessons to build applications and understand core foundational concepts.
Problem Oriented
How-To Guides
Practical and actionable recipes for specific tasks like deployment or database scaling.
Understanding Oriented
Explanations
High-level overviews of the compiler architecture, mesh routing, and design philosophy.
Information Oriented
Reference
Technical specifications for keywords, decorators, standard library, and CLI commands.
Community, Backing & License
Backing Vox (Open Collective)
Community-backed via Open Collective — every dollar raised and spent is public. Sponsorships fund developer grants, CI hardware for MENS neural training, and academic bounties.
License
Apache 2.0 — commercial use permitted, patent rights granted, modifications allowed with attribution.
LICENSE · github.com/vox-foundation/vox
Get Involved
Vox Scientia aggregates community research wherever developers are talking. Roadmap decisions and architectural questions are tracked in GitHub Discussions — the format our tooling can index, parse, and feed back into the system.
- GitHub Discussions: Architecture questions, language design feedback, and roadmap input.
- RSS Feed:
vox-lang.org/feed.xml— changelogs and architectural decision records.
Quick Documentation Links
- Installation Guide: Set up the
voxtoolchain on your machine. - Master Architecture Index: Deep dives into the compiler and runtime internals.