Build production AI agents with Generative UI — in minutes, not months.
curl -fsSL https://haira.dev/install.sh | shprovider tool agent workflow — everything you need to build production AI agents.
import "http"
provider openai {
api_key: env("OPENAI_API_KEY")
model: "gpt-4o"
}
tool get_weather(city: string) -> string {
"""Get the current weather for a city."""
resp, err = http.get("https://wttr.in/${city}?format=j1")
if err != nil { return "Failed to fetch." }
data = resp.json()
current = data["current_condition"][0]
return "${city}: ${current["temp_C"]}°C"
}
agent Assistant {
provider: openai
system: "You are a helpful assistant."
tools: [get_weather]
memory: conversation(max_turns: 10)
}
@post("/chat")
workflow Chat(message: string) -> stream {
return Assistant.stream(message)
}
fn main() {
http.Server([Chat]).listen(8080)
}Connect to any LLM — OpenAI, Anthropic, Azure, Ollama, or any OpenAI-compatible API. No SDK imports.
Give your agent capabilities. Type-checked functions with compiler-enforced documentation.
Declare an agent with tools, memory, and a system prompt. No class inheritance. No framework magic.
Expose agents as HTTP endpoints. Streaming, forms, file uploads — all built in. Deploy as a single binary.
Haira compiles to Go, then to a native binary. No interpreter, no VM, no node_modules. Ship one file, run anywhere.
provider, tool, agent, workflow are first-class language keywords — not decorators bolted onto Python classes.
Static types, pattern matching, enums, structs, pipe operator, and error handling. Catch bugs before they reach production.
SSE streaming with -> stream. Every workflow gets an auto-generated chat UI. Rich components via the ARP protocol.
Route between specialized agents automatically. Front desk to billing to tech — one config field, zero glue code.
HTTP, JSON, Postgres, Excel, Slack, GitHub, vector search, regex, time, file system — all built in, tree-shaken at compile time.
Agents return rich UI components — tables, charts, status cards, confirmations — not just text. No frontend needed.
import "ui"
tool show_metrics() -> string {
"""Show system metrics dashboard."""
ui.status_card(
title: "API Health",
value: "99.9%",
status: "success"
)
ui.table(
headers: ["Service", "Status", "Latency"],
rows: [
["Auth", "Healthy", "12ms"],
["DB", "Healthy", "3ms"],
["Cache", "Warning", "89ms"],
]
)
ui.chart(
type: "line",
title: "Requests / min",
data: get_request_data()
)
return "Metrics displayed."
}One language instead of a fragile tower of frameworks, SDKs, and YAML.
Data explorers, admin dashboards, and ops tools with generative UI. Tables, charts, and status cards — rendered by the agent.
Multi-agent handoffs, conversation memory, and session persistence. Route from triage to billing to tech — automatically.
Replace n8n, Make, and Zapier with type-safe compiled workflows. Webhooks, triggers, and parallel execution built in.
Vector search, Postgres, and document processing in the standard library. Retrieval-augmented agents without glue code.
Agents that check health, query logs, create tickets, and notify teams — all from a single chat interface.
GPT-4o for reasoning, Claude for analysis, Ollama for private data — in the same app. Switch with one line.
Install Haira, write your first agent, deploy a binary.