Skip to main content

Developer portal

AI features that run on your visitors' own AI

Write an AI feature once. Leuria runs it on the AI each visitor already has, keeps your tools in the page, and falls back when they have none.

Get started

Your visitors' AI, not your bill

ChatGPT through Codex, Claude Code, a model in LM Studio or Ollama: Leuria answers with the AI the visitor already has. You hold no keys and pay for no tokens.

Your code stays in the page

The AI can only call the tools your page gives it. It can't read the visitor's files or run commands, and the visitor approves each site once.

Something always answers

No Leuria? The browser's own model, a small model in the page, or your server take over. One API for all of them, one Connect button to bring the visitor's AI back.

See it on real websites

All the demos โ†’

A few lines in the page

A provider cascade, tools that run in the page, conversations that move to a better AI when the visitor connects one. Structured output and search by meaning come with it.

Run the examples with your AI โ†’
import { createLeuria, bridge, browserAI, defineTool } from "@leuria/client"

// The visitor's own AI first, then the browser's model.
const ai = createLeuria({ providers: [bridge({ app: "My shop" }), browserAI()] })

const searchProducts = defineTool({
name: "search_products",
description: "Search products. Returns name, price and stock.",
inputSchema: { type: "object", properties: { query: { type: "string" } } },
execute: ({ query }) => catalog.search(query), // runs in the page
})

const convo = ai.conversation({ tools: [searchProducts] })
for await (const event of convo.send("Which mug is cheapest?")) {
if (event.type === "text-delta") answer.textContent += event.text
}

Ask AI for your Docusaurus site

One plugin gives your docs an assistant that answers from your pages, with links, on each reader's own AI. It sits next to your search, and offers the same tools to the browser's own agents. This site runs it: try Ask AI at the top.

Add it to your site โ†’
npm install @leuria/docusaurus

// docusaurus.config.js
plugins: [["@leuria/docusaurus", { suggestions: ["How do I get started?"] }]]