The open full-stack AI framework
Build harnesses, data pipelines, multi-agent systems and everything in between.
Just. Write. Python.
Get going in two commands.
After installing from PyPI, run our guided setup.
pip install yera
yera hello
Simplicity and clarity.
import yera as yr
@yr.app
def chatbot():
for msg in yr.chat():
yr.response(msg)
yr.chat() yields each message the user sends, and yr.response() streams back the model's reply.
import yera as yr
class Invoice(yr.Struct):
vendor: str
total: float
due_date: str
@yr.app
def read_invoice(text: str) -> Invoice:
yr.insert(text)
return Invoice.fill(instruction="Extract the invoice details.")
Describe the shape you want as a Struct and fill it from any text. You get a typed Python object back.
import httpx
import yera as yr
@yr.tool
def get_weather(city: str) -> dict:
return httpx.get(f"https://wttr.in/{city}?format=j1", timeout=10).json()
@yr.app
def weather():
for msg in yr.chat():
yr.insert(msg)
get_weather.invoke(instruction="Get the weather for the city mentioned.")
yr.gen(instruction="Answer using the forecast.")
@yr.tool turns a function into a tool. invoke() fills in its arguments from the conversation.
import yera as yr
search_docs = yr.mcp_tools.my_mcp.search_docs
@yr.app
def docs_helper(question: str):
yr.insert(question)
search_docs.invoke(instruction="Search the docs for this question.")
yr.gen(instruction="Answer using what you found.")
yr.mcp_tools holds every MCP server you've set up. Its tools work like your own: invoke() fills in the arguments.
import yera as yr
@yr.app
def triage(ticket: str):
yr.insert(ticket)
urgency = yr.select("urgent", "normal", instruction="How urgent is this?")
if urgency == "urgent":
yr.response("Reply promising a call back within the hour.")
else:
yr.response("Reply with a friendly acknowledgement.")
yr.select() has the model pick one of your options. Branch on the answer with ordinary Python.
import yera as yr
@yr.app(sys_prompt="You write short blog posts.")
def writer(topic: str) -> str:
return yr.response(topic)
@yr.app(sys_prompt="You edit drafts to be clear and concise.")
def editor(draft: str) -> str:
return yr.response(draft)
@yr.app
def blog_team(topic: str):
draft = writer(topic)
editor(draft)
Each app is an agent with its own prompt. Call one from another and pass results as plain arguments.
import yera as yr
@yr.app
def trip_planner():
city = yr.text_input("Where are you going?")
pace = yr.buttons(["Relaxed", "Packed"], label="What pace?")
yr.response(f"Plan a {pace} day in {city}.")
Built-in widgets ask the user for input. Each call waits for their answer and returns it.
Orchestrate AI models, UI elements and integrations in ordinary Python.
Using Cursor, Claude Code or another AI coding tool? Connect it to the Yera docs.
Keep updated.
Sign up for product and release news.
By subscribing you agree to receive product updates from Yera Labs. Unsubscribe any time. See our Privacy Policy.