1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93643,e=>{"use strict";var t=e.i(13598),r=e.i(14302);function a(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),(0,t.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function s({tabs:e,code:n}){let[o,i]=(0,r.useState)(e[0]),[d,l]=(0,r.useState)(!1),c=async()=>{await navigator.clipboard.writeText(n[o]),l(!0),setTimeout(()=>l(!1),1400)};return(0,t.jsxs)("div",{className:"rounded-lg overflow-hidden border border-[#E7E5E4] dark:border-[#20222B] mb-8 text-sm",children:[(0,t.jsx)("div",{className:"flex items-center gap-1 px-3 py-2 bg-[#F5F5F4] dark:bg-[#0D0E13] border-b border-[#E7E5E4] dark:border-[#20222B]",children:e.map(e=>(0,t.jsx)("button",{onClick:()=>i(e),className:["px-2.5 py-1 text-[12px] font-medium rounded transition-colors",o===e?"bg-white dark:bg-[#0A0B10] text-[#0A0A0A] dark:text-white border border-[#E7E5E4] dark:border-[#20222B]":"text-[#737373] hover:text-[#0A0A0A] dark:hover:text-white"].join(" "),children:e},e))}),(0,t.jsxs)("div",{className:"relative bg-[#F5F5F4] dark:bg-[#0A0B10] p-4",children:[(0,t.jsx)("pre",{className:"font-mono text-[13px] text-[#0A0A0A] dark:text-[#E4E4E7] leading-relaxed overflow-x-auto",children:n[o]}),(0,t.jsx)("button",{onClick:c,className:"absolute top-3 right-3 p-1.5 text-[#737373] hover:text-[#0A0A0A] dark:hover:text-white transition-colors","aria-label":"Copy code",children:d?(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-500",children:(0,t.jsx)("polyline",{points:"20 6 9 17 4 12"})}):(0,t.jsx)(a,{})})]})]})}function n({type:e="info",children:r}){let a={info:{bg:"bg-[#EFF6FF] dark:bg-blue-900/10",border:"border-l-[3px] border-[#3B82F6]",icon:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-[#3B82F6] shrink-0 mt-0.5",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,t.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})},warning:{bg:"bg-amber-50 dark:bg-amber-900/10",border:"border-l-[3px] border-amber-400",icon:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-amber-500 shrink-0 mt-0.5",children:[(0,t.jsx)("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),(0,t.jsx)("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),(0,t.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})},tip:{bg:"bg-emerald-50 dark:bg-emerald-900/10",border:"border-l-[3px] border-emerald-500",icon:(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-emerald-500 shrink-0 mt-0.5",children:[(0,t.jsx)("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),(0,t.jsx)("polyline",{points:"22 4 12 14.01 9 11.01"})]})}}[e];return(0,t.jsxs)("div",{className:`flex gap-3 p-4 rounded-md ${a.bg} ${a.border} mb-6`,children:[a.icon,(0,t.jsx)("div",{className:"text-[14px] text-[#0A0A0A] dark:text-[#FAFAFA] leading-relaxed",children:r})]})}function o({n:e,title:r,children:a}){return(0,t.jsxs)("div",{className:"flex gap-5 mb-10",children:[(0,t.jsx)("div",{className:"flex-none w-8 h-8 rounded-full border border-[#E7E5E4] dark:border-[#20222B] flex items-center justify-center text-[13px] font-semibold text-[#0A0A0A] dark:text-white shrink-0 mt-0.5",children:e}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h3",{className:"text-[18px] font-semibold text-[#0A0A0A] dark:text-white mb-2 tracking-tight",children:r}),(0,t.jsx)("div",{className:"text-[15px] text-[#737373] leading-[1.65]",children:a})]})]})}let i=["Cursor","Claude Code","Open Code","Manual"],d={Cursor:"npx lelu-mcp add
1--cursor","Claude Code":"npx lelu-mcp add --claude","Open Code":"npx lelu-mcp add --open-code",Manual:"npx lelu-mcp start --transport stdio"},l=["Claude Code","Open Code","JSON"],c={"Claude Code":"claude mcp add --transport http lelu http://localhost:3001/sse","Open Code":"open-code mcp add --transport http lelu http://localhost:3001/sse",JSON:`{ 2 "mcpServers": { 3 "lelu": { 4 "url": "http://localhost:3001/sse" 5 } 6 } 7}`};e.s(["default",0,function(){let[e,a]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("span",{className:"inline-block mb-2 text-[12px] font-medium uppercase tracking-[0.08em] text-[#737373] dark:text-[#8B8D98] font-mono",children:"Documentation"}),(0,t.jsxs)("div",{className:"flex flex-col items-start gap-2 mb-3 sm:flex-row sm:justify-between sm:gap-4",children:[(0,t.jsx)("h1",{id:"introduction",className:"text-[28px] sm:text-[34px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white leading-tight",children:"Introduction"}),(0,t.jsxs)("div",{className:"flex items-center gap-4 shrink-0 sm:pt-2",children:[(0,t.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(window.location.href),a(!0),setTimeout(()=>a(!1),1400)},className:"flex items-center gap-1.5 text-[11px] font-semibold tracking-[0.06em] uppercase text-[#737373] hover:text-[#0A0A0A] dark:hover:text-white transition-colors",children:[e?"â":"ð"," COPY MD"]}),(0,t.jsxs)("button",{className:"flex items-center gap-1 text-[11px] font-semibold tracking-[0.06em] uppercase text-[#737373] hover:text-[#0A0A0A] dark:hover:text-white transition-colors",children:["OPEN IN",(0,t.jsx)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M6 9l6 6 6-6"})})]})]})]}),(0,t.jsx)("p",{className:"text-[15px] text-[#737373] leading-relaxed",children:"Learn how to configure Lelu in your project."})]}),(0,t.jsx)("hr",{className:"border-[#E7E5E4] dark:border-[#20222B] mb-10"}),(0,t.jsx)("p",{className:"text-[15px] text-[#0A0A0A] dark:text-[#E4E4E7] leading-[1.7] mb-6",children:"Lelu is a policy engine for AI-driven systems. It combines Rego-based authorization, confidence-aware decisioning, human approval queues, and auditable enforcement so teams can ship AI agents without giving up control."}),(0,t.jsxs)(n,{type:"tip",children:["Free to start â no account needed. Run"," ",(0,t.jsx)("code",{className:"font-mono text-[13px] px-1.5 py-0.5 bg-[#F5F5F4] dark:bg-[#0D0E13] border border-[#E7E5E4] dark:border-[#20222B] rounded",children:"npx -y lelu-mcp start"})," ","to get a policy-gated engine on your machine in one command â no account, no signup, everything free while Lelu is in beta."," ",(0,t.jsx)("a",{href:"/pricing",className:"underline hover:text-[#3B82F6] transition-colors",children:"Hosted cloud"})," ","is available as early access."]}),(0,t.jsx)("h2",{id:"features",className:"text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white mb-4 mt-14",children:"Features"}),(0,t.jsx)("p",{className:"text-[15px] text-[#737373] leading-relaxed mb-6",children:"Lelu includes the core building blocks needed to govern AI actions in production, with simple defaults for development and stronger controls for enterprise workloads."}),(0,t.jsx)("dl",{className:"space-y-5 mb-14",children:[{title:"Framework Agnostic",desc:"Works with any AI framework or model provider. Integrate with OpenAI, Anthropic, LangChain, or custom agents without changing your architecture."},{title:"Confidence-Aware Policies",desc:"Author policies that branch on the model's self-reported confidence score, not just binary allow/deny. Low-confidence actions route to human review automatically."},{title:"Human-in-the-Loop",desc:"Automatically queue risky or uncertain operations for human review. The agent pauses and waits for an approval or denial before continuing."},{title:"Prompt Injection Defense",desc:"Detect and block adversarial instructions embedded in user input or tool responses before they can manipulate agent behavior."},{title:"Observability & Tracing",desc:"OpenTelemetry integration with AI agent semantic conventions. Every authorization decision is a traced span with full context."},{title:"Multi-Agent Coordination",desc:"Parent agents delegate to sub-agents with scoped, time-limited permissions. Enforces least-privilege across swarms."}].map(e=>(0,t.jsxs)("div",{className:"flex gap-3",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-[#0A0A0A] dark:bg-white mt-[9px] shrink-0"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"font-semibold text-[15px] text-[#0A0A0A] dark:text-white mb-1",children:e.title}),(0,t.jsx)("dd",{className:"text-[15px] text-[#737373] leading-relaxed",children:e.desc})]})]},e.title))}),(0,t.jsx)("h2",{id:"why-lelu",className:"text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white mb-4 mt-14",children:"Why Lelu?"}),(0,t.jsxs)("p",{className:"text-[15px] text-[#0A0A0A] dark:text-[#E4E4E7] leading-[1.7] mb-4",children:["Traditional authorization systems â RBAC, ABAC â are binary: a user either has permission or they don't. But AI agents operate on probabilities. When an agent tries to execute a financial trade, delete a database record, or send an email on someone's behalf, you don't just want to know ",(0,t.jsx)("em",{children:"if"})," it has permission â you want to know"," ",(0,t.jsx)("em",{children:"how confident"})," it is."]}),(0,t.jsx)("p",{className:"text-[15px] text-[#0A0A0A] dark:text-[#E4E4E7] leading-[1.7] mb-10",children:"Lelu is the authorization layer purpose-built for this. It sits between your AI agent and the world, evaluating every proposed action against your policies and the agent's own certainty before letting it proceed."}),(0,t.jsx)("h2",{id:"how-it-works",className:"text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white mb-8 mt-14",children:"How Lelu Works"}),(0,t.jsxs)(o,{n:1,title:"Confidence-Aware Policies",children:[(0,t.jsx)("p",{children:"Write authorization rules in Rego that branch on the AI's self-reported certainty. A high-confidence action is allowed; a borderline one routes to a human. No binary allow/deny."}),(0,t.jsxs)("div",{className:"mt-4 rounded-md bg-[#F5F5F4] dark:bg-[#0D0E13] border border-[#
7E7E5E4] dark:border-[#20222B] p-4 font-mono text-[13px] text-[#0A0A0A] dark:text-[#E4E4E7]",children:[(0,t.jsxs)("div",{className:"mb-1",children:[(0,t.jsx)("span",{className:"text-rose-600 dark:text-rose-400",children:"allow"})," ",(0,t.jsx)("span",{className:"text-[#737373",children:"{"})]}),(0,t.jsxs)("div",{className:"pl-4 mb-1",children:["input.action == ",(0,t.jsx)("span",{className:"text-emerald-600 dark:text-emerald-400",children:'"trade"'})]}),(0,t.jsxs)("div",{className:"pl-4 mb-1",children:["input.confidence"," ",(0,t.jsx)("span",{className:"text-[#737373]",children:">="})," ",(0,t.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"0.90"})]}),(0,t.jsx)("div",{className:"text-[#737373]",children:"}"}),(0,t.jsxs)("div",{className:"mt-3 mb-1",children:[(0,t.jsx)("span",{className:"text-rose-600 dark:text-rose-400",children:"require_approval"})," ",(0,t.jsx)("span",{className:"text-[#737373]",children:"{"})]}),(0,t.jsxs)("div",{className:"pl-4 mb-1",children:["input.action == ",(0,t.jsx)("span",{className:"text-emerald-600 dark:text-emerald-400",children:'"trade"'})]}),(0,t.jsxs)("div",{className:"pl-4 mb-1",children:["input.confidence"," ",(0,t.jsx)("span",{className:"text-[#737373]",children:"<"})," ",(0,t.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"0.90"})]}),(0,t.jsx)("div",{className:"text-[#737373]",children:"}"})]})]}),(0,t.jsx)(o,{n:2,title:"Human-in-the-Loop",children:(0,t.jsx)("p",{children:"When an action fails the confidence threshold, Lelu enqueues it for human review. The agent pauses and polls until an operator approves or denies. This gives teams fine-grained control without blocking the happy path."})}),(0,t.jsx)(o,{n:3,title:"Immutable Audit Trail",children:(0,t.jsx)("p",{children:"Every authorization decision â the action requested, the policy matched, the confidence score, the human reviewer if any â is recorded as an immutable event. Export to your SIEM or query via the Audit API."})}),(0,t.jsx)("h2",{id:"architecture",className:"text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white mb-4 mt-14",children:"Architecture"}),(0,t.jsxs)("p",{className:"text-[15px] text-[#737373] leading-relaxed mb-6",children:["Lelu runs as a sidecar or standalone service. Your agents make a single"," ",(0,t.jsx)("code",{className:"font-mono text-[13px] px-1.5 py-0.5 bg-[#F5F5F4] dark:bg-[#0D0E13] border border-[#E7E5E4] dark:border-[#20222B] rounded",children:"POST /v1/agent/authorize"})," ","call before every tool invocation. The engine evaluates your Rego policies â sub-50ms â and returns"," ",(0,t.jsx)("code",{className:"font-mono text-[13px] px-1.5 py-0.5 bg-[#F5F5F4] dark:bg-[#0D0E13] border border-[#E7E5E4] dark:border-[#20222B] rounded",children:"allow"}),","," ",(0,t.jsx)("code",{className:"font-mono text-[13px] px-1.5 py-0.5 bg-[#F5F5F4] dark:bg-[#0D0E13] border border-[#E7E5E4] dark:border-[#20222B] rounded",children:"deny"}),", or"," ",(0,t.jsx)("code",{className:"font-mono text-[13px] px-1.5 py-0.5 bg-[#F5F5F4] dark:bg-[#0D0E13] border border-[#E7E5E4] dark:border-[#20222B] rounded",children:"require_approval"}),"."]}),(0,t.jsx)("div",{className:"rounded-lg border border-[#E7E5E4] dark:border-[#20222B] overflow-hidden mb-14",children:(0,t.jsxs)("div",{className:"bg-[#F5F5F4] dark:bg-[#0D0E13] p-5 space-y-2 text-[13px] font-mono text-[#0A0A0A] dark:text-[#E4E4E7]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[#737373]",children:"AI Agent"}),(0,t.jsx)("span",{className:"flex-1 border-t border-dashed border-[#E7E5E4] dark:border-[#20222B]"}),(0,t.jsx)("span",{className:"text-[#737373]",children:"â"}),(0,t.jsx)("span",{children:"POST /v1/agent/authorize"}),(0,t.jsx)("span",{className:"text-[#737373]",children:"â"}),(0,t.jsx)("span",{children:"Lelu Engine"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 pt-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded border border-emerald-200 dark:border-emerald-800/40 bg-emerald-50 dark:bg-emerald-900/10",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0"}),(0,t.jsx)("span",{className:"text-emerald-700 dark:text-emerald-400 text-[12px]",children:"allow â conf ⥠90%"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded border border-amber-200 dark:border-amber-800/40 bg-amber-50 dark:bg-amber-900/10",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500 shrink-0"}),(0,t.jsx)("span",{className:"text-amber-700 dark:text-amber-400 text-[12px]",children:"review â conf < 90%"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded border border-red-200 dark:border-red-800/40 bg-red-50 dark:bg-red-900/10",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500 shrink-0"}),(0,t.jsx)("span",{className:"text-red-700 dark:text-red-400 text-[12px]",children:"deny â blocked"})]})]})]})}),(0,t.jsx)("h2",{id:"mcp",className:"text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white mb-4 mt-14",children:"Model Context Protocol"}),(0,t.jsx)("p",{className:"text-[15px] text-[#0A0A0A] dark:text-[#E4E4E7] leading-[1.7] mb-4",children:"Lelu ships a first-party MCP server so you can use it with any AI client that supports the Model Context Protocol. Use the CLI to add it in one command, or configure manually."}),(0,t.jsxs)(n,{type:"info",children:["The Lelu MCP is powered by"," ",(0,t.jsx)("a",{href:"https://github.com/modelcontextprotocol/servers",className:"underline hover:text-[#3B82F6] transition-colors",children:"fastmcp"}),". The official MCP package is ",(0,t.jsx)("code",{className:"font-mono text-[12px] bg-[#F5F5F4] dark:bg-[#12141A] px-1.5 py-0.5 rounded",children:"lelu-mcp"})," on npm."]}),(0,t.jsx)("h3",{id:"cli-options",className:"text-[17px] font-semibold tracking-[-0.01em] text-[#0A0A0A] dark:text-white mb-3 mt-8",children:"CLI options"}),(0,t.jsx)("p",{className:"text-[15px] text-[#737373] mb-4",children:"Use the Lelu CLI to add the MCP server to your preferred client:"}),(0,t.jsx)(s,{tabs:[...i],code:d}),(0,t.jsx)("h3",{id:"manual-configuration",className:"text-[17px] font-semibold tracking-[-0.01em] text-[#0A0A0A] dark:text-white mb-3 mt-8",children:"Manual configuration"}),(0,t.jsx)("p",{className:"text-[15px] text-[#737373] mb-4",children:"Alternatively, point any MCP-compatible client at the Lelu SSE endpoint directly:"}),(0,t.jsx)(s,{tabs:[...l],code:c}),(0,t.jsx)("h2",{id:"next-steps",className:"text-[22px] font-bold tracking-[-0.02em] text-[#0A0A0A] dark:text-white mb-4 mt-14",children:"Next steps"}),(0,t.jsx)("ul",{className:"space-y-2.5 text-[15px] mb-14",children:[{href:"/docs/quickstart#zero-setup",label:"Try Lelu locally",desc:"npx -y lelu-mcp start â no account, all on your machine"},{href:"/api-key",label:"Get your API key",desc:"Free account for the hosted API and dashboard"},{href:"/docs/installation",label:"Installation",desc:"Add Lelu to an existing project"},{href:"/docs/quickstart",label:"Quickstart",desc:"Authorize your first agent action"},{href:"/docs/concepts/architecture",label:"Architecture",desc:"How Lelu works under the hood"},{href:"/docs/concepts/api",label:"API reference",desc:"Full REST API documentation"}].map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("a",{href:e.href,className:"flex items-baseline gap-2 group",children:[(0,t.jsx)("span",{className:"text-[#0A0A0A] dark:text-white font-medium group-hover:underline underline-offset-2",children:e.label}),(0,t.jsx)("span",{className:"text-[#737373]",children:"â"}),(0,t.jsx)("span",{className:"text-[#737373]",children:e.desc})]})},e.href))}),(0,t.jsx)("div",{className:"flex justify-end items-center pt-8 border-t border-[#
7E7E5E4] dark:border-[#20222B]",children:(0,t.jsxs)("a",{href:"/docs/installation",className:"flex items-center gap-2 text-[14px] font-medium text-[#0A0A0A] dark:text-white hover:opacity-70 transition-opacity",children:["Installation",(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M5 12h14M12 5l7 7-7 7"})})]})})]})}])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.