"use client"; import { useEffect, useRef, useState } from "react"; import Link from "next/link"; // ─── Icon helper ───────────────────────────────────────────────────────────── function Icon({ name, className = "" }: { name: string; className?: string }) { return {name}; } // ─── Animated typing text ───────────────────────────────────────────────────── function TypeWriter({ lines }: { lines: string[] }) { const [displayed, setDisplayed] = useState(""); const [lineIdx, setLineIdx] = useState(0); const [charIdx, setCharIdx] = useState(0); const [deleting, setDeleting] = useState(false); useEffect(() => { const current = lines[lineIdx]; let timeout: ReturnType; if (!deleting && charIdx < current.length) { timeout = setTimeout(() => setCharIdx((c) => c + 1), 55); } else if (!deleting && charIdx === current.length) { timeout = setTimeout(() => setDeleting(true), 2200); } else if (deleting && charIdx > 0) { timeout = setTimeout(() => setCharIdx((c) => c - 1), 28); } else { setDeleting(false); setLineIdx((l) => (l + 1) % lines.length); } setDisplayed(current.slice(0, charIdx)); return () => clearTimeout(timeout); }, [charIdx, deleting, lineIdx, lines]); return ( {displayed} _ ); } // ─── Animated counter ───────────────────────────────────────────────────────── function Counter({ to, suffix = "" }: { to: number; suffix?: string }) { const [val, setVal] = useState(0); const ref = useRef(null); useEffect(() => { const obs = new IntersectionObserver( ([entry]) => { if (!entry.isIntersecting) return; obs.disconnect(); const duration = 1800; const start = performance.now(); const tick = (now: number) => { const t = Math.min((now - start) / duration, 1); const ease = 1 - Math.pow(1 - t, 3); setVal(Math.round(ease * to)); if (t < 1) requestAnimationFrame(tick); }; requestAnimationFrame(tick); }, { threshold: 0.4 } ); if (ref.current) obs.observe(ref.current); return () => obs.disconnect(); }, [to]); return ( {val.toLocaleString()} {suffix} ); } // ─── Particle canvas ────────────────────────────────────────────────────────── function ParticleField() { const canvasRef = useRef(null); useEffect(() => { const canvas = canvasRef.current; if (!canvas) return; const ctx = canvas.getContext("2d"); if (!ctx) return; let raf: number; const particles: { x: number; y: number; vx: number; vy: number; r: number; o: number }[] = []; const resize = () => { canvas.width = canvas.offsetWidth; canvas.height = canvas.offsetHeight; }; resize(); window.addEventListener("resize", resize); for (let i = 0; i < 90; i++) { particles.push({ x: Math.random() * canvas.width, y: Math.random() * canvas.height, vx: (Math.random() - 0.5) * 0.35, vy: (Math.random() - 0.5) * 0.35, r: Math.random() * 1.5 + 0.3, o: Math.random() * 0.5 + 0.1, }); } const draw = () => { ctx.clearRect(0, 0, canvas.width, canvas.height); particles.forEach((p) => { p.x += p.vx; p.y += p.vy; if (p.x < 0 || p.x > canvas.width) p.vx *= -1; if (p.y < 0 || p.y > canvas.height) p.vy *= -1; ctx.beginPath(); ctx.arc(p.x, p.y, p.r, 0, Math.PI * 2); ctx.fillStyle = `rgba(183,166,251,${p.o})`; ctx.fill(); }); for (let i = 0; i < particles.length; i++) { for (let j = i + 1; j < particles.length; j++) { const dx = particles[i].x - particles[j].x; const dy = particles[i].y - particles[j].y; const dist = Math.sqrt(dx * dx + dy * dy); if (dist < 110) { ctx.beginPath(); ctx.moveTo(particles[i].x, particles[i].y); ctx.lineTo(particles[j].x, particles[j].y); ctx.strokeStyle = `rgba(183,166,251,${0.12 * (1 - dist / 110)})`; ctx.lineWidth = 0.6; ctx.stroke(); } } } raf = requestAnimationFrame(draw); }; draw(); return () => { cancelAnimationFrame(raf); window.removeEventListener("resize", resize); }; }, []); return ; } // ─── Negotiation Log (animated) ─────────────────────────────────────────────── const LOG_ENTRIES = [ { time: "10:02:41", text: "Agent A proposes ", highlight: "$54.20", color: "#B7A6FB" }, { time: "10:02:42", text: "Agent B rejects proposal", highlight: null, color: "#94a3b8" }, { time: "10:02:42", text: "Agent B counters ", highlight: "$58.00", color: "#22d3ee" }, { time: "10:02:43", text: "Calculating overlap…", highlight: null, color: "#fbbf24" }, { time: "10:02:44", text: "Convergence at ", highlight: "98.4%", color: "#34d399" }, ]; function NegotiationLog() { const [visible, setVisible] = useState(0); useEffect(() => { if (visible >= LOG_ENTRIES.length) return; const t = setTimeout(() => setVisible((v) => v + 1), 900); return () => clearTimeout(t); }, [visible]); return (
{LOG_ENTRIES.slice(0, visible).map((e, i) => (
[{e.time}] {e.text} {e.highlight && {e.highlight}}
))} {visible >= LOG_ENTRIES.length && (
✓ SETTLEMENT REACHED TX: 0x8a…9f2c · 12ms
)}
); } // ─── Feature card ───────────────────────────────────────────────────────────── function FeatureCard({ icon, title, desc, tag, accent }: { icon: string; title: string; desc: string; tag: string; accent: string }) { return (
{ (e.currentTarget as HTMLElement).style.boxShadow = `0 0 30px ${accent}26`; (e.currentTarget as HTMLElement).style.borderColor = `${accent}40`; }} onMouseLeave={(e) => { (e.currentTarget as HTMLElement).style.boxShadow = "none"; (e.currentTarget as HTMLElement).style.borderColor = "rgba(255,255,255,0.05)"; }} >

{title}

{desc}

{tag}
); } // ─── Main landing page ──────────────────────────────────────────────────────── export default function LandingPage() { const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 20); window.addEventListener("scroll", onScroll); return () => window.removeEventListener("scroll", onScroll); }, []); return ( <>
{/* Navbar */}
AgentMesh
{/* Hero */}
{/* Floating code fragments — anchored to section edges, clear of headline */}
SEQ_INIT: 0x98A1
PROBABILITY: 0.99982
LOGIC_STREAM >> ON
WEIGHT_BALANCER: ENABLED
{/* Status pill */}
v2.0 Protocol Live
{/* Headline */}

The Agent Economy
is Here.

{/* Typewriter */}

{/* CTAs */}
Open Dashboard Read Documentation
{/* Code snippet */}
const negotiation = await mesh.init({"{"}
{" "}strategy: 'tit-for-tat',
{" "}limit: 5000,
{" "}currency: 'USDC'
{"}"});
{/* Marquee */}
{[...Array(2)].map((_, di) => (
{[["RESOLVED","$1.2M IN EXPENSES","text-white"],["FAIRNESS SCORE","98%","text-emerald-400"],["ACTIVE NODES","14,203","text-[#22d3ee]"],["AVG SETTLEMENT","400MS","text-[#B7A6FB]"],["PROTOCOL","V2.0 STABLE","text-white"],["NEGOTIATIONS TODAY","3,841","text-amber-400"]].map(([label,value,cls],i) => ( {label}: {value} ))}
))}
{/* Stats row */}
{[{ label:"Negotiations Settled", to:48291, suffix:"+" },{ label:"Avg Fairness Score", to:97, suffix:"%" },{ label:"Active Nodes", to:14203, suffix:"" },{ label:"Avg Settlement", to:400, suffix:"ms" }].map(({ label, to, suffix }) => (

{label}

))}
{/* The Mesh in Action */}

The Mesh in Action

Real-time settlement · Advanced Convergence Graph

Live Feed
{/* Graph pane */}
{[["GRAPH_ID: 8X92","#B7A6FB",true],["LATENCY: 12ms","#94a3b8",false],["ENTROPY: 0.041","#22d3ee",false]].map(([label,color,pulse]) => ( {pulse && } {label} ))}
{/* Agent visualizer */}
A
Consensus: 98%
B
{/* Mini bars */}
{[["#B7A6FB",0.2,16],["#B7A6FB",0.4,32],["#B7A6FB",0.3,24],["#B7A6FB",0.6,48],["#22d3ee",0.5,40],["#22d3ee",1.0,56],["#22d3ee",0.4,32],["#B7A6FB",1.0,48],["#B7A6FB",0.2,16]].map(([color,opacity,h],i) => (
))}
{/* Log pane */}

Negotiation Log

{/* Core Features */}

Why negoT8

Core Features

Designed for the next generation of autonomous commerce. Pure logic, zero friction.

{/* CTA */}

Ready to join the mesh?

Start deploying agents in minutes. Join thousands of developers building the autonomous agent economy.

Open Dashboard Connect on Telegram
{/* Footer */}
); }