Yera makes it easy to build end-to-end AI apps in Python.
Orchestrate model invocations, UI elements and more using syntax you already know.
Documentation · API reference · CLI reference · Contributing
Start Here
Getting started with Yera is easy: there's a single installation from PyPI, and then a guided setup process that will get you configured and ready to build.
Using uv
We recommend using uv to manage your Python environment, but it's not required. You can do a normal pip install and expect everything to work the same.
Install
Assuming you are in a directory where uv init has been run, just do
uv add yera
to install. This does not include ollama or llama-cpp-python dependencies by default,
but they are supported as extras. You can also just install them yourself.
Get onboarded
Once the library is installed you can then run
uv run yera hello
This will bring up a Yera browser window with the hello app running inside it.
Hello will take you through
- Setting up your model providers (i.e. OpenAI, Anthropic etc.), find the models you have available for them and then load it all into config.
- Choosing your default model from the configured set.
- Configuring the MCP connections you want to use.
After these hello can (if you choose) hand you over to yera guide, a chatbot that can query Yera's docs and help you understand how to use Yera running on your default model choice.
Using pip
With pip you simply run
pip install yera
yera hello
and then the rest of the process is the same.
Optional: Connect the Docs MCP
To really hit the ground running add the Yera docs MCP to your agentic coding app.
Build and Run Your First App
To build your first chatbot create a file called app.py and add the following code inside.
import yera as yr
@yr.app
def chatbot() -> None:
for msg in yr.chat():
yr.response(msg)
After that, run with
uv run yera run app.py
What You Just Ran
This is one of the simplest Yera applications you can write, and it demonstrates a few important components
-
import yera as yr- Yera is designed to keep it simple: everything can be used from a single import. -
@yr.app- In Yera python functions are promoted to apps using a decorator. To run an app you can call it, to run an app within an app just call it in the function body. You can build up multi-agent system with nested calls like this. -
yr.response- This is an LLM-powered function that takes a prompt and returns a response. Functions like these are aware of the app they are in and the model context they should use. -
yr.chat- this is a chat loop. It will iteratively ask the user for input and yield it.
Other ways to run
You do not have to run apps in the browser. Since they're just python functions you can run them wherever you can call them. You can run the above app in jupyter by simply calling it. To run in a plain python script you can also just call the chatbot function, but it will need to be behind a main guard due to how the Yera runtime handles processes. Add
if __name__ == "__main__":
chatbot()
to the bottom of your script in that case.
Why Yera?
Yera is designed to bring all the components to build sophisticated AI apps together in one natural interface familiar to you and your coding agent.
- build the whole thing in python (
if,match, etc.) - separate applications from models, stay provider-neutral
- connect your existing tools via MCP, or python
- build a ui by calling python functions - no frontend experience needed
- keep a trace of everything that happened in your application for observability and governance. Visualise it in the browser UI.
- access your Yera apps running on your server from anywhere and share them with others via Yera Link (coming soon).
Plus, much more to come such as easy hosting / deployment, full execution audit trails, static analysis of data flows in your apps, and batch jobs / pipelines.
Core Concepts
Apps
A Yera app is a self-contained unit of AI-powered functionality, written as a Python function. It can combine model operations, tools, user interface elements, control flow and other Yera apps into one reusable flow.
You build these apps by decorating ordinary python functions with @yr.app, you run them by calling them like any other function.
Calling one app from another starts a nested app with its own conversation and model context.
Models, Contexts and Generation
In Yera, models are separated from application logic. They are a component of the software and invoked with particular primitives that live under the top-level import. The model they actually use is set by the active context.
@yr.app(llm=yr.llm.model1())
def demo():
yr.response("prompt 1") # goes to model1
with yr.llm.model2():
yr.response("prompt 2") # goes to model2
yr.response("prompt 3") # goes to model1
Model contexts can be set explicitly by using them using them as a context manager via the with keyword. In addition to this apps will use your default model automatically if no other is specified.
@yr.app
def demo():
yr.response("What's the capital of France?")
Inputs and Outputs
Yera turns Python function calls into user interaction. Input functions collect text, choices, dates, numbers and structured forms, while output functions present Markdown, tables, charts, images and other interface elements.
The runtime sends those interactions through the active presentation layer, so the same app can run in Yera's browser UI, jupyter or in the terminal without a separate frontend implementation.
Structured Data
Define and validate data structures as yr.Struct subclasses using typed python fields.
Call .fill() to create an instance using the current LLM, or .form() to present it to the user as a form input widget.
class Point(yr.Struct):
x: str
y: str
p1 = Point.fill()
p2 = Point.form()
This gives model-generated data and user input the same explicit, validated shape before the rest of the application uses it.
Control Flow
Yera contains two functions for model-driven control flow: condition and select.
yr.condition
if yr.condition("The user is asking about the weather."):
forecast.invoke()
else:
yr.gen()
yr.select
match yr.select("billing", "tech", "sales"):
case "billing":
refund.invoke()
case "tech":
diagnose.invoke()
case "sales":
yr.gen()
You can use the output of these in normal if, match, loops and function calls.
Tools
A Yera tool is a function-shaped capability that an app can call. It has a name, a description, typed inputs and a result, together with an interface that integrates its execution into the Yera runtime.
Tools can have one of two origins: either a python function decorated with @yr.tool or an MCP operation accessed through yr.mcp. In either case application code uses a callable object with extra methods.
Call a tool normally when your app already has the right values
weather = get_weather(city="London")
Use .invoke() when you want the active LLM to derive the model arguments from the current context and call the function
weather = get_weather.invoke(
instruction="Get the weather for the city the user mentioned."
)
When a tool runs inside an app, Yera wraps the call with runtime behaviour: it records a traceable tool operation, handles its presentation and lifecycle, and makes its result available to subsequent model operations. The trace records safe operational metadata rather than tool arguments or results.
Sessions and Events
During app execution, Yera produces an ordered stream of events. Output events describe what should be shown to the user, while input events carry the user’s responses back to the waiting app.
The runtime also emits logging events for app invocations, model requests, tool calls, session lifecycle changes and other useful operational metadata.
Together, these events form a record of the session. Separating app execution from its presentation allows the same app to work across different interfaces. When an app runs through the Yera browser server, the record is stored and used to reconstruct the session and display its activity trace. Everything a Yera app shows (and every runtime operation Yera instruments) becomes part of this record.
Learn Yera
- Quickstart — install Yera, configure a model and build your first app.
- Tutorials — learn Yera progressively through complete working examples.
- How-to guides — find focused instructions for particular tasks and integrations.
- Examples — explore small Yera apps that you can run and modify.
- API reference and CLI reference — look up individual functions, types and commands.
- Yera Guide — run
yera guidefor an interactive assistant that can search the Yera documentation using your configured model.
Support and Project Status
Yera is prerelease and under active development. It supports Python 3.11 onwards. APIs, config etc. may change before version 1.0.
Please report bugs and feature requests through GitHub Issues. When reporting a problem please include your yera version, python version, operating system and a small reproducible example. Make sure you remove any creds or other sensitive data beforehand.
Contributing
Contributions to Yera are welcome, including bug fixes, documentation, integrations and examples. See CONTRIBUTING.md for development setup, project checks and pull request guidance.
License
Yera Core is licensed under the Apache License 2.0.
Metadata
Release files for yera 0.11.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yera-0.11.4.tar.gz | 3.5 MB | With provenance | Details for yera-0.11.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yera-0.11.4-py3-none-any.whl | Python 3 | none | any | Details for yera-0.11.4-py3-none-any.whl |
Total release size: 6.9 MB
Release files / yera-0.11.4.tar.gz
| Download URL | yera-0.11.4.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25bba452a7269511e904f3d3a2b3cb50c16f371d64772aa3338a382d15c71b8d
|
|
BLAKE2b-256 checksum How to use checksums |
ffb73573164d7875bc59409043ff00b74545e9ff5eb21163ddec9cbc6b9ee0f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / yera-0.11.4-py3-none-any.whl
| Download URL | yera-0.11.4-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d38f6a56b1a36832c5fd21f4dd3bf5e3755b39207b06b145810dc68d9bc65548
|
|
BLAKE2b-256 checksum How to use checksums |
9f9ea42f52037a8e7055695e387ca2a4cfbc9439b71d38ef3cd787c41a9001d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for yera 0.11.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for yera-0.11.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.