Skip to main content

Examples

Small recipes, each one complete. On the portal you can edit and run them in the page, with your own AI once you connect it, or your browser's built-in model before that.

RecipeWhat it showsNeeds
A first answerAsk, get text back, see who answeredAny AI
A page toolThe AI calls a function of your pageAn AI that uses tools
Structured outputFree text in, a typed object outAny AI
A conversation with contextFollow-ups, and values bound to a turnAny AI
The visitor answersA tool that waits for the visitor's confirmationAn AI that uses tools
Search by meaningAn index of your content in the browserAn embedding model
MiddlewareWatch and redact every tool callAn AI that uses tools
Who answersThe cascade, routing options, and what to do when no AI can answerNothing

In the runnable blocks, ai is the page's Leuria client, print(value) shows a value, and signal stops the run when you press Stop. In your own code, create the client with createLeuria (see the Quickstart).