Yera

The open full-stack Python framework for AI apps

Design

Just. Write. Python.

Yera is designed to be familiar, clear and expressive. A warm soothing bath for your weary dev's brain.

01

Low abstraction

Yera is a natural extension of what you already know. Build up sophisticated app logic from if, for, with and other familiar Python primitives, plus new ones from Yera.

02

import yera as yr

One import is all you need. Get right to the functions for invoking LLMs, orchestrating UI elements, and decorators for turning code into apps and tools. Your configured models and connected MCP tools are there too, under yr.llm and yr.mcp.

03

Easy integration

Call your Python code from your Yera app, and call your Yera apps from your Python code. Apps are just functions: run as a script, in Jupyter or serve it in your browser via yera run.

How it works

Explore a real example.

Here's a real app for exploring the iris dataset. Step through the session to see it in the chat UI, and hover over the underlined code to see what each part does.

python
import sqlite3

import pandas as pd
import yera as yr
from sklearn.datasets import load_iris


class Scatter(yr.Struct):
    x: str
    y: str
    c: str | None
    title: str


@yr.tool
def query(sql: str) -> pd.DataFrame:
    data = load_iris(as_frame=True)
    iris = data.frame
    iris["species"] = data.target_names[data.target]
    with sqlite3.connect(":memory:") as db:
        iris.to_sql("iris", db, index=False)
        return pd.read_sql(sql, db)


SCHEMA = """Table "iris", one row per flower:
- "sepal length (cm)", "sepal width (cm)"
- "petal length (cm)", "petal width (cm)"
- species: setosa, versicolor or virginica
- SQLite: no CORR, STDEV or MEDIAN functions"""


@yr.app(name="Fisher's Irises", sys_prompt=SCHEMA)
def ask_your_data() -> None:
    for i, message in enumerate(yr.chat()):
        if i == 0:
            yr.session_title(message)
        yr.insert(message)
        df = query.invoke("Write one SQLite SELECT.")
        yr.table(df.round(3))
        yr.gen(instruction="Reply in a short sentence.")
        numeric = list(df.select_dtypes("number"))
        if len(numeric) > 1 and yr.confirm("Plot it?"):
            scatter = Scatter.fill()
            ax = df.plot.scatter(**scatter.model_dump())
            ax.figure.show()
Fisher's Irises
Session a0ebd48b
  1. Table "iris", one row per flower:

    • "sepal length (cm)", "sepal width (cm)"
    • "petal length (cm)", "petal width (cm)"
    • species: setosa, versicolor or virginica
    • SQLite: no CORR, STDEV or MEDIAN functions
  2. How do petal length and width correlate for each species?

  3. Sql

    SELECT species, (COUNT() * SUM(1.0 * "petal length (cm)" * "petal width (cm)") - SUM(1.0 * "petal length (cm)") * SUM(1.0 * "petal width (cm)")) / (SQRT(COUNT() * SUM(1.0 * "petal length (cm)" * "petal length (cm)") - SUM(1.0 * "petal length (cm)") * SUM(1.0 * "petal length (cm)")) * SQRT(COUNT(*) * SUM(1.0 * "petal width (cm)" * "petal width (cm)") - SUM(1.0 * "petal width (cm)") * SUM(1.0 * "petal width (cm)"))) AS correlation FROM iris GROUP BY species;

    { "sql": "SELECT species, (COUNT(*) * SUM(1.0 * \"petal length (cm)\" * \"petal width (cm)\") - SUM(1.0 * \"petal length (cm)\") * SUM(1.0 * \"petal width (cm)\")) / (SQRT(COUNT(*) * SUM(1.0 * \"petal length (cm)\" * \"petal length (cm)\") - SUM(1.0 * \"petal length (cm)\") * SUM(1.0 * \"petal length (cm)\")) * SQRT(COUNT(*) * SUM(1.0 * \"petal width (cm)\" * \"petal width (cm)\") - SUM(1.0 * \"petal width (cm)\") * SUM(1.0 * \"petal width (cm)\"))) AS correlation FROM iris GROUP BY species;" }
    query call complete0.0s
    Result3 items
    SpeciesCorrelation
    setosa0.3316300408
    versicolor0.7866680885
    virginica0.3221082159
    {
      "__yera__": "DataFrame",
      "table": "{\"schema\":{\"fields\":[{\"name\":\"index\",\"type\":\"integer\"},{\"name\":\"species\",\"type\":\"string\",\"extDtype\":\"str\"},{\"name\":\"correlation\",\"type\":\"number\"}],\"primaryKey\":[\"index\"],\"pandas_version\":\"1.4.0\"},\"data\":[{\"index\":0,\"species\":\"setosa\",\"correlation\":0.3316300408},{\"index\":1,\"species\":\"versicolor\",\"correlation\":0.7866680885},{\"index\":2,\"species\":\"virginica\",\"correlation\":0.3221082159}]}"
    }
  4. speciescorrelation
    setosa0.332
    versicolor0.787
    virginica0.322
  5. Petal length and width correlate most strongly for versicolor (r ≈ 0.79), compared with setosa (0.33) and virginica (0.32).

  6. Show me every flower's petal length and width, by species.

  7. Sql

    SELECT species, "petal length (cm)" AS petal_length_cm, "petal width (cm)" AS petal_width_cm FROM iris ORDER BY species, "petal length (cm)", "petal width (cm)";

    { "sql": "SELECT species, \"petal length (cm)\" AS petal_length_cm, \"petal width (cm)\" AS petal_width_cm FROM iris ORDER BY species, \"petal length (cm)\", \"petal width (cm)\";" }
    query call complete0.0s
    Result150 items
    SpeciesPetal length cmPetal width cm
    setosa10.2
    setosa1.10.1
    setosa1.20.2
    setosa1.20.2
    setosa1.30.2
    140 rows omitted
    virginica6.42
    virginica6.62.1
    virginica6.72
    virginica6.72.2
    virginica6.92.3
    {
      "__yera__": "DataFrame",
      "table": "{\"schema\":{\"fields\":[{\"name\":\"index\",\"type\":\"integer\"},{\"name\":\"species\",\"type\":\"string\",\"extDtype\":\"str\"},{\"name\":\"petal_length_cm\",\"type\":\"number\"},{\"name\":\"petal_width_cm\",\"type\":\"number\"}],\"primaryKey\":[\"index\"],\"pandas_version\":\"1.4.0\"},\"data\":[{\"index\":0,\"species\":\"setosa\",\"petal_length_cm\":1.0,\"petal_width_cm\":0.2},{\"index\":1,\"species\":\"setosa\",\"petal_length_cm\":1.1,\"petal_width_cm\":0.1},{\"index\":2,\"species\":\"setosa\",\"petal_length_cm\":1.2,\"petal_width_cm\":0.2},{\"index\":3,\"species\":\"setosa\",\"petal_length_cm\":1.2,\"petal_width_cm\":0.2},{\"index\":4,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.2},{\"index\":5,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.2},{\"index\":6,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.2},{\"index\":7,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.2},{\"index\":8,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.3},{\"index\":9,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.3},{\"index\":10,\"species\":\"setosa\",\"petal_length_cm\":1.3,\"petal_width_cm\":0.4},{\"index\":11,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.1},{\"index\":12,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.1},{\"index\":13,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":14,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":15,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":16,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":17,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":18,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":19,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":20,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.2},{\"index\":21,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.3},{\"index\":22,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.3},{\"index\":23,\"species\":\"setosa\",\"petal_length_cm\":1.4,\"petal_width_cm\":0.3},{\"index\":24,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.1},{\"index\":25,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.1},{\"index\":26,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":27,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":28,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":29,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":30,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":31,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":32,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.2},{\"index\":33,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.3},{\"index\":34,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.4},{\"index\":35,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.4},{\"index\":36,\"species\":\"setosa\",\"petal_length_cm\":1.5,\"petal_width_cm\":0.4},{\"index\":37,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.2},{\"index\":38,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.2},{\"index\":39,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.2},{\"index\":40,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.2},{\"index\":41,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.2},{\"index\":42,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.4},{\"index\":43,\"species\":\"setosa\",\"petal_length_cm\":1.6,\"petal_width_cm\":0.6},{\"index\":44,\"species\":\"setosa\",\"petal_length_cm\":1.7,\"petal_width_cm\":0.2},{\"index\":45,\"species\":\"setosa\",\"petal_length_cm\":1.7,\"petal_width_cm\":0.3},{\"index\":46,\"species\":\"setosa\",\"petal_length_cm\":1.7,\"petal_width_cm\":0.4},{\"index\":47,\"species\":\"setosa\",\"petal_length_cm\":1.7,\"petal_width_cm\":0.5},{\"index\":48,\"species\":\"setosa\",\"petal_length_cm\":1.9,\"petal_width_cm\":0.2},{\"index\":49,\"species\":\"setosa\",\"petal_length_cm\":1.9,\"petal_width_cm\":0.4},{\"index\":50,\"species\":\"versicolor\",\"petal_length_cm\":3.0,\"petal_width_cm\":1.1},{\"index\":51,\"species\":\"versicolor\",\"petal_length_cm\":3.3,\"petal_width_cm\":1.0},{\"index\":52,\"species\":\"versicolor\",\"petal_length_cm\":3.3,\"petal_width_cm\":1.0},{\"index\":53,\"species\":\"versicolor\",\"petal_length_cm\":3.5,\"petal_width_cm\":1.0},{\"index\":54,\"species\":\"versicolor\",\"petal_length_cm\":3.5,\"petal_width_cm\":1.0},{\"index\":55,\"species\":\"versicolor\",\"petal_length_cm\":3.6,\"petal_width_cm\":1.3},{\"index\":56,\"species\":\"versicolor\",\"petal_length_cm\":3.7,\"petal_width_cm\":1.0},{\"index\":57,\"species\":\"versicolor\",\"petal_length_cm\":3.8,\"petal_width_cm\":1.1},{\"index\":58,\"species\":\"versicolor\",\"petal_length_cm\":3.9,\"petal_width_cm\":1.1},{\"index\":59,\"species\":\"versicolor\",\"petal_length_cm\":3.9,\"petal_width_cm\":1.2},{\"index\":60,\"species\":\"versicolor\",\"petal_length_cm\":3.9,\"petal_width_cm\":1.4},{\"index\":61,\"species\":\"versicolor\",\"petal_length_cm\":4.0,\"petal_width_cm\":1.0},{\"index\":62,\"species\":\"versicolor\",\"petal_length_cm\":4.0,\"petal_width_cm\":1.2},{\"index\":63,\"species\":\"versicolor\",\"petal_length_cm\":4.0,\"petal_width_cm\":1.3},{\"index\":64,\"species\":\"versicolor\",\"petal_length_cm\":4.0,\"petal_width_cm\":1.3},{\"index\":65,\"species\":\"versicolor\",\"petal_length_cm\":4.0,\"petal_width_cm\":1.3},{\"index\":66,\"species\":\"versicolor\",\"petal_length_cm\":4.1,\"petal_width_cm\":1.0},{\"index\":67,\"species\":\"versicolor\",\"petal_length_cm\":4.1,\"petal_width_cm\":1.3},{\"index\":68,\"species\":\"versicolor\",\"petal_length_cm\":4.1,\"petal_width_cm\":1.3},{\"index\":69,\"species\":\"versicolor\",\"petal_length_cm\":4.2,\"petal_width_cm\":1.2},{\"index\":70,\"species\":\"versicolor\",\"petal_length_cm\":4.2,\"petal_width_cm\":1.3},{\"index\":71,\"species\":\"versicolor\",\"petal_length_cm\":4.2,\"petal_width_cm\":1.3},{\"index\":72,\"species\":\"versicolor\",\"petal_length_cm\":4.2,\"petal_width_cm\":1.5},{\"index\":73,\"species\":\"versicolor\",\"petal_length_cm\":4.3,\"petal_width_cm\":1.3},{\"index\":74,\"species\":\"versicolor\",\"petal_length_cm\":4.3,\"petal_width_cm\":1.3},{\"index\":75,\"species\":\"versicolor\",\"petal_length_cm\":4.4,\"petal_width_cm\":1.2},{\"index\":76,\"species\":\"versicolor\",\"petal_length_cm\":4.4,\"petal_width_cm\":1.3},{\"index\":77,\"species\":\"versicolor\",\"petal_length_cm\":4.4,\"petal_width_cm\":1.4},{\"index\":78,\"species\":\"versicolor\",\"petal_length_cm\":4.4,\"petal_width_cm\":1.4},{\"index\":79,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.3},{\"index\":80,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.5},{\"index\":81,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.5},{\"index\":82,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.5},{\"index\":83,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.5},{\"index\":84,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.5},{\"index\":85,\"species\":\"versicolor\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.6},{\"index\":86,\"species\":\"versicolor\",\"petal_length_cm\":4.6,\"petal_width_cm\":1.3},{\"index\":87,\"species\":\"versicolor\",\"petal_length_cm\":4.6,\"petal_width_cm\":1.4},{\"index\":88,\"species\":\"versicolor\",\"petal_length_cm\":4.6,\"petal_width_cm\":1.5},{\"index\":89,\"species\":\"versicolor\",\"petal_length_cm\":4.7,\"petal_width_cm\":1.2},{\"index\":90,\"species\":\"versicolor\",\"petal_length_cm\":4.7,\"petal_width_cm\":1.4},{\"index\":91,\"species\":\"versicolor\",\"petal_length_cm\":4.7,\"petal_width_cm\":1.4},{\"index\":92,\"species\":\"versicolor\",\"petal_length_cm\":4.7,\"petal_width_cm\":1.5},{\"index\":93,\"species\":\"versicolor\",\"petal_length_cm\":4.7,\"petal_width_cm\":1.6},{\"index\":94,\"species\":\"versicolor\",\"petal_length_cm\":4.8,\"petal_width_cm\":1.4},{\"index\":95,\"species\":\"versicolor\",\"petal_length_cm\":4.8,\"petal_width_cm\":1.8},{\"index\":96,\"species\":\"versicolor\",\"petal_length_cm\":4.9,\"petal_width_cm\":1.5},{\"index\":97,\"species\":\"versicolor\",\"petal_length_cm\":4.9,\"petal_width_cm\":1.5},{\"index\":98,\"species\":\"versicolor\",\"petal_length_cm\":5.0,\"petal_width_cm\":1.7},{\"index\":99,\"species\":\"versicolor\",\"petal_length_cm\":5.1,\"petal_width_cm\":1.6},{\"index\":100,\"species\":\"virginica\",\"petal_length_cm\":4.5,\"petal_width_cm\":1.7},{\"index\":101,\"species\":\"virginica\",\"petal_length_cm\":4.8,\"petal_width_cm\":1.8},{\"index\":102,\"species\":\"virginica\",\"petal_length_cm\":4.8,\"petal_width_cm\":1.8},{\"index\":103,\"species\":\"virginica\",\"petal_length_cm\":4.9,\"petal_width_cm\":1.8},{\"index\":104,\"species\":\"virginica\",\"petal_length_cm\":4.9,\"petal_width_cm\":1.8},{\"index\":105,\"species\":\"virginica\",\"petal_length_cm\":4.9,\"petal_width_cm\":2.0},{\"index\":106,\"species\":\"virginica\",\"petal_length_cm\":5.0,\"petal_width_cm\":1.5},{\"index\":107,\"species\":\"virginica\",\"petal_length_cm\":5.0,\"petal_width_cm\":1.9},{\"index\":108,\"species\":\"virginica\",\"petal_length_cm\":5.0,\"petal_width_cm\":2.0},{\"index\":109,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":1.5},{\"index\":110,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":1.8},{\"index\":111,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":1.9},{\"index\":112,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":1.9},{\"index\":113,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":2.0},{\"index\":114,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":2.3},{\"index\":115,\"species\":\"virginica\",\"petal_length_cm\":5.1,\"petal_width_cm\":2.4},{\"index\":116,\"species\":\"virginica\",\"petal_length_cm\":5.2,\"petal_width_cm\":2.0},{\"index\":117,\"species\":\"virginica\",\"petal_length_cm\":5.2,\"petal_width_cm\":2.3},{\"index\":118,\"species\":\"virginica\",\"petal_length_cm\":5.3,\"petal_width_cm\":1.9},{\"index\":119,\"species\":\"virginica\",\"petal_length_cm\":5.3,\"petal_width_cm\":2.3},{\"index\":120,\"species\":\"virginica\",\"petal_length_cm\":5.4,\"petal_width_cm\":2.1},{\"index\":121,\"species\":\"virginica\",\"petal_length_cm\":5.4,\"petal_width_cm\":2.3},{\"index\":122,\"species\":\"virginica\",\"petal_length_cm\":5.5,\"petal_width_cm\":1.8},{\"index\":123,\"species\":\"virginica\",\"petal_length_cm\":5.5,\"petal_width_cm\":1.8},{\"index\":124,\"species\":\"virginica\",\"petal_length_cm\":5.5,\"petal_width_cm\":2.1},{\"index\":125,\"species\":\"virginica\",\"petal_length_cm\":5.6,\"petal_width_cm\":1.4},{\"index\":126,\"species\":\"virginica\",\"petal_length_cm\":5.6,\"petal_width_cm\":1.8},{\"index\":127,\"species\":\"virginica\",\"petal_length_cm\":5.6,\"petal_width_cm\":2.1},{\"index\":128,\"species\":\"virginica\",\"petal_length_cm\":5.6,\"petal_width_cm\":2.2},{\"index\":129,\"species\":\"virginica\",\"petal_length_cm\":5.6,\"petal_width_cm\":2.4},{\"index\":130,\"species\":\"virginica\",\"petal_length_cm\":5.6,\"petal_width_cm\":2.4},{\"index\":131,\"species\":\"virginica\",\"petal_length_cm\":5.7,\"petal_width_cm\":2.1},{\"index\":132,\"species\":\"virginica\",\"petal_length_cm\":5.7,\"petal_width_cm\":2.3},{\"index\":133,\"species\":\"virginica\",\"petal_length_cm\":5.7,\"petal_width_cm\":2.5},{\"index\":134,\"species\":\"virginica\",\"petal_length_cm\":5.8,\"petal_width_cm\":1.6},{\"index\":135,\"species\":\"virginica\",\"petal_length_cm\":5.8,\"petal_width_cm\":1.8},{\"index\":136,\"species\":\"virginica\",\"petal_length_cm\":5.8,\"petal_width_cm\":2.2},{\"index\":137,\"species\":\"virginica\",\"petal_length_cm\":5.9,\"petal_width_cm\":2.1},{\"index\":138,\"species\":\"virginica\",\"petal_length_cm\":5.9,\"petal_width_cm\":2.3},{\"index\":139,\"species\":\"virginica\",\"petal_length_cm\":6.0,\"petal_width_cm\":1.8},{\"index\":140,\"species\":\"virginica\",\"petal_length_cm\":6.0,\"petal_width_cm\":2.5},{\"index\":141,\"species\":\"virginica\",\"petal_length_cm\":6.1,\"petal_width_cm\":1.9},{\"index\":142,\"species\":\"virginica\",\"petal_length_cm\":6.1,\"petal_width_cm\":2.3},{\"index\":143,\"species\":\"virginica\",\"petal_length_cm\":6.1,\"petal_width_cm\":2.5},{\"index\":144,\"species\":\"virginica\",\"petal_length_cm\":6.3,\"petal_width_cm\":1.8},{\"index\":145,\"species\":\"virginica\",\"petal_length_cm\":6.4,\"petal_width_cm\":2.0},{\"index\":146,\"species\":\"virginica\",\"petal_length_cm\":6.6,\"petal_width_cm\":2.1},{\"index\":147,\"species\":\"virginica\",\"petal_length_cm\":6.7,\"petal_width_cm\":2.0},{\"index\":148,\"species\":\"virginica\",\"petal_length_cm\":6.7,\"petal_width_cm\":2.2},{\"index\":149,\"species\":\"virginica\",\"petal_length_cm\":6.9,\"petal_width_cm\":2.3}]}"
    }
  8. speciespetal_length_cmpetal_width_cm
    setosa1.00.2
    setosa1.10.1
    setosa1.20.2
    setosa1.20.2
    setosa1.30.2
    ⋮
    virginica6.42.0
    virginica6.62.1
    virginica6.72.0
    virginica6.72.2
    virginica6.92.3
    140 rows omitted
  9. The table above lists all 150 flowers’ petal lengths and widths, grouped by species.

  10. Yes
  11. Xpetal_length_cm▍
    Ypetal_width_cm▍
    Cspecies▍
    TitlePetal length vs. width by species▍
    { "x": "petal_length_cm", "y": "petal_width_cm", "c": "species", "title": "Petal length vs. width by species" }
  12. Petal length vs. width by species
$

This code was run with Yera 0.5.0 and GPT-6 Luna, and the session recorded to make the click-through example.

Get started

Chop-chop.

Get going in two commands. Install from PyPI and onboard yourself with our easy guided setup. Import your available providers, models and MCPs.

01 · install
pip install yera
02 · run
yera hello
How to

The basics.

01Decorate

  • @yr.app turns a function into a Yera app. They behave just like Python functions: they are called with (), take args, and return values. Build multi-agent systems by simply nesting calls.
  • Each app defines a context that contains the models you can call on. Use your defaults or override it with @yr.app(llm=...).
  • @yr.tool turns functions into tools your apps can use. Your LLM fills in the arguments, and the call appears in the UI folded away, with its inputs and result one click from view.
python
@yr.app(name="Fisher's Irises", sys_prompt=SCHEMA)
def ask_your_data() -> None:
    ...
python
@yr.app
def agent_1():
    agent_2()
python
@yr.tool
def query(sql: str) -> pd.DataFrame:
    ...
Visibility

See what your app did.

Every Yera browser session includes an activity trace showing what ran, how operations were nested, and where time or failures occurred. It records safe operational metadata and remains with the local session.

01

Follow the execution

See app, model, tool and user-input activity as a nested timeline, with the relationships between each operation kept intact.

02

Find failures quickly

Inspect status, timing and safe error classifications without digging through console output or exposing the contents of the session.

03

Built for accountability

Structured session records provide useful visibility today and a foundation for the audit and policy controls still to come.

Activity trace

Session active

  1. RuntimeSessionCompleted
    18.42 s
    ▸ Details
    1. RuntimeRuntimeCompleted
      18.40 s
      1. AppApp invocationCompleted
        18.36 s
        ▸ Details
        1. UserUser inputCompleted
          9.37 s
          1. ModelModel requestCompleted
            3.18 s
            ▸ Details
            1. ToolTool callCompleted
              948 ms
              ▸ Details
For the long term

Yera Labs, Yera, and Open Core

Yera Labs' mission is to build the AI stack that is safe, reliable and open. To build applications that put people and their needs at the centre, and help others do the same.

  • Open Core Yera is at the core of what we are building. It will remain free and open source under Apache 2.0 forever.
  • Sustainable Business We're a for-profit company with an open-core business plan. We earn from paid extensions and hosting for teams or enterprise. The boundary between open and commercial code will be clear and fixed.
  • No Surprises We will plan and build in the open, with a public roadmap and policy handbook. We are dedicated to clear and open communication.
  • People First We are human centred in all designs, decisions and policy. We want all our stakeholders and our community to flourish.
What's next

Just getting started.

We will expand what Yera and your apps can do, how people can use them, and how they can be governed as a service.

Coming soon Link Your Yera apps, on your other devices and for other people.
  • Start your Yera server and open a session from anywhere.
  • Share apps: a free account to use someone's app, a subscription to serve your own.
  • End-to-end encrypted. Yera Labs can't see your data, let alone train on it.
More on Link →
In development SIGL Your app as a graph, from plain Python.
  • The Static Inspection Graph Language translates your Yera app into a graph automatically. No wiring nodes together by hand.
  • Execution that's durable, traceable and scalable.
  • Static analysis: check what your app can and can't do before it runs.
  • The foundation for scalable execution and governance.
Planned Scalable execution Run your apps at any scale.
  • Serve thousands of users, or run demanding numerical jobs with AI models mixed in.
  • Run it on your own infrastructure first, then as a hosted service from Yera Labs.
  • Built on SIGL.
Planned Governance Build organisational controls on the activity records Yera already keeps.
  • Local activity traces provide operational visibility today; organisational governance is planned.
  • Fine-grained authorisation for models, tools, and users.
  • Static data-flow analysis on the SIGL graph: see who could do what before any code runs.
  • In-depth logging and execution audit, built on the records Yera already keeps of every session.
  • Built on SIGL. For organisations.
In development Batch jobs Pipelines and jobs that run themselves.
  • Set up data-processing pipelines and batch jobs on your Yera server.
  • Run them on a schedule or other triggers.
  • History, progress and logs on your server, and on the go with Link.
In development More modalities Every kind of model your app needs, not just LLMs.
  • Embeddings and reranking for retrieval.
  • Speech in and out, image understanding and OCR.
  • Each one works as a model context in Yera, with the same design as LLMs.
Planned Showcase Show off what you've built.
  • Show your work in a public gallery.
  • List your app and link to it, so others can find and try it.
  • Later: hosted apps, then a marketplace for apps and skins.
Planned White-labelling Make the chat UI yours.
  • Apply your organisation's branding to the Yera UI.

Next steps.