import { ArrowRightIcon, LogoIcon } from "@/components/icons";
import type { CSSProperties, ReactNode } from "react";
import { ButtonLink } from "@/components/button";
import { InstallCopy } from "@/components/install-copy";
import { HomeChatViewport } from "@/components/home-chat-viewport";
import { ChatToolRuns } from "@/components/home-chat-tools";
import { LoopDiagram } from "@/components/loop-diagram";
import { highlight } from "@/lib/highlight";
import { pageMetadata } from "@/lib/page-metadata";
export const metadata = pageMetadata("");
const CODE_EXAMPLE = `pub fn main(world: World) -> Void raises {
check world.out.write("hello from zero\\n")
}`;
const GRAPH_EXAMPLE = `zero-graph v1
origin source-text
module "hello"
hash "graph:a7f7e6899a73f3b4"
node #decl_ad8d9028 Function name:"main" type:"Void" public:true fallible:true
node #param_4610ae76 Param name:"world" type:"World"
node #expr_c403020c MethodCall name:"write" type:"Void"
node #expr_653eeb6e Literal type:"String" value:"hello from zero\\n"
edge #expr_c403020c arg #expr_653eeb6e order:0`;
const PATCH_EXAMPLE = `zero patch \\
--expect-graph-hash graph:a7f7e6899a73f3b4 \\
--op 'set node="#expr_653eeb6e" \\
field="value" \\
expect="hello from zero\\n" \\
value="hello graph\\n"'`;
const CONSTRAINTS = [
"Token efficiency",
"Low memory",
"Fast startup",
"Fast builds",
"Low latency",
"Zero dependencies",
];
const ARCHITECTURE_STEPS = [
{
label: "Human",
title: "Asks for an outcome",
body: "Build a CRM API, add auth, or fix a failing route",
},
{
label: "Agent",
title: "Uses Graph",
body: "Symbols, calls, types, effects, node IDs, and graph hashes",
},
{
label: "Compiler",
title: "Checks patches",
body: "Shape, type, stale-state, and repository metadata checks",
},
{
label: "Human",
title: "Reviews projection",
body: "Readable .0 projections stay available for review and rare manual edits",
},
];
/* ─── Primitives ──────────────────────────────────── */
function GridGlow() {
return (
);
}
function SectionHeader({
title,
description,
}: {
title: string;
description: string;
}) {
return (
);
}
function VisualGlow({ className = "", children }: { className?: string; children: ReactNode }) {
return {children}
;
}
function Panel({ className = "", children }: { className?: string; children: ReactNode }) {
return (
{children}
);
}
function WindowBar({ title }: { title: string }) {
return (
);
}
function CodeWindow({
title,
html,
className = "",
}: {
title: string;
html: string;
className?: string;
}) {
return (
);
}
function ArchitectureDiagram() {
return (
{ARCHITECTURE_STEPS.map((item, index) => (
{index + 1}
{item.label}
{item.title}
{item.body}
{index < ARCHITECTURE_STEPS.length - 1 ? (
) : null}
))}
);
}
/* ─── Chat mockup ─────────────────────────────────── */
function chatRevealStyle(delay: string): CSSProperties {
return { "--chat-delay": delay } as CSSProperties;
}
function ChatMockup() {
return (
build hello world in zerolang
I'll set up the package, patch the graph, and run it.
Done. zero.graph validated at{" "}
graph:a7f7e689 with symbol{" "}
main. It prints:
hello from zero
);
}
/* ─── Section wrapper ─────────────────────────────── */
function Section({ children }: { children: ReactNode }) {
return (
);
}
export default function HomePage() {
return (
{/* Hero */}
Experimental
The Programming
Language for Agents
A programming language where the graph is the program. Humans ask
for outcomes. Agents query the program graph, submit checked
edits, and prove the result.
Expect breaking changes. Run it in a safe environment, not against
production systems.
{/* 01 — Chat */}
{/* 02 — Loop */}
{/* 03 — Patch */}
{[
["graph hash", "graph:b3c1d04f"],
["node", "#expr_653eeb6e"],
["field", "value"],
["symbols", "main"],
["projection", "src/main.0"],
].map(([k, v]) => (
- {k}
- {v}
))}
{/* 04 — Graph */}
{/* 04 — Constraints */}
{CONSTRAINTS.map((c) => (
{c}
))}
{/* CTA */}
Explore with us.
Start with the getting started guide, then read the graph architecture
and compile-path pages to see why the program database matters.
Get started
Graph architecture
);
}