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.
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 โKiln & Co.
A mug shop whose assistant looks up prices and stock with the page's own tools, and fills in an order form from a free-text message.
Maren's notebook
A digital garden to search by meaning, with related notes and answers drawn from the notes, linked to them.
Hollowmark
A guide to 48 original creatures: describe one in your own words to find it, and have the AI build a team.
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?"] }]]