{"id":35096798,"url":"https://github.com/mrzdevcore/haira","last_synced_at":"2026-03-11T07:03:32.706Z","repository":{"id":327292523,"uuid":"1107254721","full_name":"mrzdevcore/haira","owner":"mrzdevcore","description":"Haira: The programming language for AI agents.","archived":false,"fork":false,"pushed_at":"2026-03-05T22:18:32.000Z","size":211923,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-05T23:40:25.238Z","etag":null,"topics":["agentic","agentic-workflow","ai","ai-agents","chatbot","compiled-language","compiler","developer-tools","generative-ui","golang","llm","machine-learning","mcp","programming-language","runtime","sse","websocket","workflow-automation"],"latest_commit_sha":null,"homepage":"https://haira.dev/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrzdevcore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-30T21:34:16.000Z","updated_at":"2026-03-05T22:18:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mrzdevcore/haira","commit_stats":null,"previous_names":["mrzdevcore/haira"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/mrzdevcore/haira","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzdevcore%2Fhaira","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzdevcore%2Fhaira/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzdevcore%2Fhaira/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzdevcore%2Fhaira/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrzdevcore","download_url":"https://codeload.github.com/mrzdevcore/haira/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzdevcore%2Fhaira/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30373521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic","agentic-workflow","ai","ai-agents","chatbot","compiled-language","compiler","developer-tools","generative-ui","golang","llm","machine-learning","mcp","programming-language","runtime","sse","websocket","workflow-automation"],"created_at":"2025-12-27T15:34:35.872Z","updated_at":"2026-03-11T07:03:32.700Z","avatar_url":"https://github.com/mrzdevcore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/banner.svg\" alt=\"Haira\" width=\"600\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eHigh-level Agentic Instruction \u0026 Runtime Architecture\u003c/strong\u003e\u003cbr\u003e\n  \u003cem\u003eThe programming language for AI agents and workflows.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-Apache%202.0-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/go-1.22+-00ADD8.svg\" alt=\"Go 1.22+\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/examples-35-2962FF.svg\" alt=\"35 examples\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://haira.dev\"\u003eWebsite\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://haira.dev/docs/getting-started/installation\"\u003eDocumentation\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://haira.dev/docs/examples\"\u003eExamples\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://haira.dev/agentic-rendering-protocol\"\u003eARP Protocol\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://haira.dev/generative-ui\"\u003eGenerative UI\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003e **Note:** Haira is under heavy development and not yet production-ready. APIs and syntax may change. Use at your own risk.\n\nHaira is a compiled language designed from the ground up for building agentic applications. Providers, tools, agents, and workflows are part of the language itself — not frameworks bolted on top. Write your agent logic, compile it to a native binary, and ship it.\n\n```haira\nimport \"io\"\nimport \"http\"\n\nprovider openai {\n    api_key: env(\"OPENAI_API_KEY\")\n    model: \"gpt-4o\"\n}\n\ntool get_weather(city: string) -\u003e string {\n    \"\"\"Get the current weather for a given city\"\"\"\n    resp, err = http.get(\"https://wttr.in/${city}?format=j1\")\n    if err != nil { return \"Failed to fetch weather data.\" }\n    data = resp.json()\n    current = data[\"current_condition\"][0]\n    return \"${city}: ${current[\"temp_C\"]}C\"\n}\n\nagent Assistant {\n    model: openai\n    system: \"You are a helpful assistant. Be concise.\"\n    tools: [get_weather]\n    memory: conversation(max_turns: 10)\n    temperature: 0.7\n}\n\n@post(\"/api/chat\")\nworkflow Chat(message: string, session_id: string) -\u003e { reply: string } {\n    reply, err = Assistant.ask(message, session: session_id)\n    if err != nil { return { reply: \"Something went wrong.\" } }\n    return { reply: reply }\n}\n\nfn main() {\n    server = http.Server([Chat])\n    io.println(\"Server running on :8080\")\n    io.println(\"UI: http://localhost:8080/_ui/\")\n    server.listen(8080)\n}\n```\n\n## Architecture\n\n```\n                              ┌─────────────────────────────────────┐\n                              │           .haira source             │\n                              └──────────────┬──────────────────────┘\n                                             │\n                    ┌────────────────────────────────────────────────┐\n                    │                  COMPILER                      │\n                    │                                                │\n                    │   ┌───────┐   ┌────────┐   ┌──────────┐        │\n                    │   │ Lexer │──▶│ Parser │──▶│ Checker  │        │\n                    │   └───────┘   └────────┘   └─────┬────┘        │\n                    │                                  │             │\n                    │                            ┌─────▼──────┐      │\n                    │                            │  Codegen   │      │\n                    │                            │  (Go emit) │      │\n                    │                            └─────┬──────┘      │\n                    └──────────────────────────────────┼─────────────┘\n                                                       │\n                                                  go build\n                                                       │\n                                                       ▼\n                    ┌─────────────────────────────────────────────────┐\n                    │              NATIVE BINARY                      │\n                    │                                                 │\n                    │  ┌─────────────────────────────────────────┐    │\n                    │  │            Haira Runtime                │    │\n                    │  │                                         │    │\n                    │  │  ┌──────────┐  ┌───────┐  ┌──────────┐  │    │\n                    │  │  │ Provider │  │ Agent │  │ Workflow │  │    │\n                    │  │  └──────────┘  └───┬───┘  └────┬─────┘  │    │\n                    │  │                    │           │        │    │\n                    │  │         ┌──────────┴───────────┘        │    │\n                    │  │         │                               │    │\n                    │  │  ┌──────▼──────┐     ┌──────────────┐   │    │\n                    │  │  │ HTTP Server │     │  MCP Server  │   │    │\n                    │  │  │  REST + SSE │     │ stdio / HTTP │   │    │\n                    │  │  └──────┬──────┘     └──────────────┘   │    │\n                    │  │         │                               │    │\n                    │  │  ┌──────▼──────┐     ┌──────────────┐   │    │\n                    │  │  │  ARP Bridge │     │  Observe /   │   │    │\n                    │  │  │ (protocol)  │     │  Langfuse    │   │    │\n                    │  │  └──┬──────┬───┘     └──────────────┘   │    │\n                    │  │     │      │                            │    │\n                    │  └─────┼──────┼────────────────────────────┘    │\n                    │        │      │                                 │\n                    │   ┌────▼──┐ ┌─▼────────┐   ┌───────────────┐    │\n                    │   │  SSE  │ │WebSocket │   │  SQLite Store │    │\n                    │   │(http) │ │(_arp/v1) │   │  (sessions)   │    │\n                    │   └───┬───┘ └────┬─────┘   └───────────────┘    │\n                    └───────┼──────────┼──────────────────────────────┘\n                            │          │\n                            ▼          ▼\n                    ┌──────────────────────────────────┐\n                    │          UI SDK (Lit)            │\n                    │                                  │\n                    │  ┌──────┐ ┌──────┐ ┌──────────┐  │\n                    │  │ Chat │ │ Form │ │Generative│  │\n                    │  │  UI  │ │  UI  │ │UI Comps  │  │\n                    │  └──────┘ └──────┘ └──────────┘  │\n                    │                                  │\n                    │  tables, charts, status cards,   │\n                    │  code blocks, diffs, key-value,  │\n                    │  confirm, choices, forms,        │\n                    │  product cards, progress views   │\n                    └──────────────────────────────────┘\n```\n\n**Data flow:** `.haira` source is compiled through Lexer → Parser → Checker → Go Codegen, then `go build` produces a single native binary. At runtime, the binary embeds the full Haira runtime (agents, providers, tools, workflows, HTTP server, ARP protocol bridge, UI SDK) — zero external dependencies.\n\n## Why Haira?\n\n| What you replace | With Haira |\n|------------------|------------|\n| Python + LangChain/LangGraph | `agent` + `tool` keywords |\n| n8n / Make / Zapier | `workflow` with `@post`, `@get` triggers + auto UI |\n| CrewAI / AutoGen | Multi-agent with `handoffs` and `spawn` |\n| Custom chatbot backend | Agent `memory` + `-\u003e stream` + built-in chat UI |\n| YAML/JSON config files | `provider` keyword — config in code |\n| MCP glue code | `mcp.Server()` / `provider { transport: \"mcp\" }` |\n| Vercel AI SDK + React UI | Generative UI with `ui.*` components |\n\n## Key Features\n\n- **4 agentic keywords** — `provider`, `tool`, `agent`, `workflow`\n- **Compiles to native binaries** — via Go codegen, single executable output\n- **Generative UI** — agents render rich UI components (tables, charts, status cards, forms) via `ui.*` helpers\n- **ARP (Agentic Rendering Protocol)** — transport-agnostic protocol for agent-to-renderer communication (WebSocket + SSE)\n- **Auto UI** — every workflow gets a form UI at `/_ui/`, streaming workflows get a ChatGPT-style chat UI\n- **RESTful triggers** — `@get`, `@post`, `@put`, `@delete` decorators\n- **Streaming** — `-\u003e stream` workflows served as SSE with WebSocket upgrade\n- **Agent handoffs** — agents delegate to other agents with `strategy: \"parallel\"` or `\"sequential\"`\n- **Agent memory** — `conversation(max_turns: N)` per session\n- **Eval framework** — `eval` blocks for automated agent testing with pass/fail thresholds\n- **Tool lifecycle hooks** — `@before` and `@after` blocks for pre/post-processing\n- **Verification loops** — `verify { assert ... }` inside `@retry` steps for assertion-driven retries\n- **Cross-harness export** — `--target claude-code` generates Claude Code agent configs + MCP binary\n- **Pre-built agent templates** — `import \"agents\"` for CodeReviewer, Planner, Summarizer, and more\n- **File uploads** — `file` type with multipart handling, auto file picker in UI\n- **Workflow steps** — named steps with telemetry, `@retry`, lifecycle hooks (`onerror`, `onsuccess`)\n- **Parallel execution** — `spawn { }` blocks for concurrent agent calls\n- **Pipe operator** — `data |\u003e transform |\u003e output`\n- **MCP support** — consume external tools (`provider { transport: \"mcp\" }`) and expose workflows as MCP tools (`mcp.Server()`)\n- **Observability** — built-in `observe` module with Langfuse integration\n- **14 stdlib packages** — postgres, sqlite, excel, vector, slack, github, gitlab, langfuse, agents, auth, websearch, healthcheck, and more\n- **Go-style simplicity** — familiar syntax, explicit error handling\n\n## The Four Primitives\n\n### Provider — LLM backend configuration\n\n```haira\nprovider openai {\n    api_key: env(\"OPENAI_API_KEY\")\n    model: \"gpt-4o\"\n}\n\n// Azure OpenAI\nprovider azure {\n    api_key: env(\"AZURE_OPENAI_API_KEY\")\n    endpoint: env(\"AZURE_OPENAI_ENDPOINT\")\n    model: env(\"AZURE_OPENAI_DEPLOYMENT_NAME\")\n    api_version: \"2025-01-01-preview\"\n}\n\n// Local models via Ollama\nprovider local {\n    endpoint: \"http://localhost:11434/v1\"\n    model: \"llama3\"\n}\n```\n\nAny OpenAI-compatible API works — set `endpoint` and `model`.\n\n### Tool — function with LLM-visible description\n\n```haira\ntool search_kb(query: string) -\u003e string {\n    \"\"\"Search the knowledge base for relevant articles\"\"\"\n    resp, err = http.get(\"https://api.example.com/search?q=${query}\")\n    if err != nil { return \"Search failed.\" }\n    return resp.body\n}\n```\n\n### Agent — LLM entity with model, prompt, and tools\n\n```haira\nagent SupportBot {\n    model: openai\n    system: \"You are a helpful customer support agent.\"\n    tools: [search_kb]\n    memory: conversation(max_turns: 20)\n    temperature: 0.3\n}\n```\n\nThree ways to call an agent:\n\n```haira\nreply, err = SupportBot.ask(\"How do I reset my password?\")\nresult, err = SupportBot.run(\"Help with billing\")\nreturn SupportBot.stream(message, session: session_id)\n```\n\n### Workflow — function with a trigger\n\n```haira\n@post(\"/api/support\")\nworkflow Support(message: string, session_id: string) -\u003e { reply: string } {\n    reply, err = SupportBot.ask(message, session: session_id)\n    if err != nil { return { reply: \"Something went wrong.\" } }\n    return { reply: reply }\n}\n```\n\n## Generative UI\n\nAgents can render rich UI components directly into the chat. Tools return `ui.*` helpers that display tables, charts, status cards, and more — no frontend code required:\n\n```haira\ntool query_data(sql: string) -\u003e string {\n    \"\"\"Execute a SQL query and display results as a table\"\"\"\n    rows, err = db.query(sql)\n    if err != nil {\n        return ui.status_card(\"error\", \"Query Failed\", conv.to_string(err))\n    }\n    headers = keys(rows[0])\n    table_rows = []\n    for row in rows {\n        cells = []\n        for h in headers {\n            cells = array.push(cells, conv.to_string(row[h]))\n        }\n        table_rows = array.push(table_rows, cells)\n    }\n    return ui.table(\"Results\", headers, table_rows)\n}\n\ntool visualize(chart_type: string, title: string, labels: string, datasets: string) -\u003e string {\n    \"\"\"Create a chart visualization\"\"\"\n    return ui.chart(chart_type, title, json.parse(labels), json.parse(datasets))\n}\n```\n\nAvailable UI components:\n\n| Component | Helper | Description |\n|-----------|--------|-------------|\n| Status Card | `ui.status_card(status, title, message?)` | Success/error/warning/info indicator |\n| Table | `ui.table(title, headers, rows)` | Searchable data table |\n| Chart | `ui.chart(type, title, labels, datasets)` | Line, bar, pie, scatter, area charts |\n| Key-Value | `ui.key_value(title, items)` | Labeled property list |\n| Code Block | `ui.code_block(title, language, code)` | Syntax-highlighted code |\n| Diff | `ui.diff(title, before, after)` | Before/after comparison |\n| Progress | `ui.progress(title, steps)` | Multi-step progress tracker |\n| Form | `ui.form(title, fields)` | Interactive form input |\n| Confirm | `ui.confirm(title, message?)` | Yes/no confirmation dialog |\n| Choices | `ui.choices(title, options)` | Option picker (buttons/list) |\n| Product Cards | `ui.product_cards(title, cards)` | Product card grid with images |\n| Group | `ui.group(child1, child2, ...)` | Compose multiple components |\n\n## Agent Handoffs\n\nAgents can delegate to specialized agents automatically:\n\n```haira\nagent FrontDesk {\n    model: openai\n    system: \"Greet users. Hand off billing questions to BillingAgent.\"\n    handoffs: [BillingAgent, TechAgent]\n    memory: conversation(max_turns: 10)\n}\n\nagent BillingAgent {\n    model: openai\n    system: \"You handle billing and payment questions.\"\n}\n\nagent TechAgent {\n    model: openai\n    system: \"You handle technical support questions.\"\n}\n```\n\n## Streaming\n\n```haira\n@post(\"/api/stream\")\nworkflow Stream(message: string, session_id: string) -\u003e stream {\n    return Assistant.stream(message, session: session_id)\n}\n```\n\nStreaming workflows support two transports:\n- **SSE** — clients requesting `Accept: text/event-stream` get SSE chunks\n- **WebSocket** — clients connect to `/_arp/v1` for bidirectional ARP communication\n\nBoth transports deliver the same data. The built-in chat UI automatically upgrades to WebSocket when available, falling back to SSE.\n\n## Workflow Steps \u0026 Lifecycle Hooks\n\n```haira\n@webui(title: \"File Summarizer\", description: \"Upload a text file and get an AI summary\")\n@post(\"/api/summarize\")\nworkflow Summarize(document: file, context: string) -\u003e { summary: string } {\n    onerror err {\n        io.eprintln(\"Workflow failed: ${err}\")\n        return { summary: \"Error: ${err}\" }\n    }\n\n    step \"Read file\" {\n        content, read_err = io.read_file(document)\n        if read_err != nil { return { summary: \"Failed to read file.\" } }\n    }\n\n    step \"Summarize\" {\n        reply, err = Summarizer.ask(content)\n        if err != nil { return { summary: \"AI error.\" } }\n    }\n\n    return { summary: reply }\n}\n```\n\nSteps provide named telemetry. `@retry` adds automatic retry with backoff:\n\n```haira\n@retry(max: 10, delay: 5000, backoff: \"exponential\")\nstep \"Call external API\" {\n    result = http.get(url)\n}\n```\n\n## Auto UI\n\nEvery workflow automatically gets a web UI — zero configuration:\n\n- **`/_ui/`** — index page listing all workflows\n- **`/_ui/\u003cpath\u003e`** — form UI for regular workflows, chat UI for streaming workflows\n- **`@webui(title: \"...\", description: \"...\")`** — optional UI customization\n- **`file` params** — automatically render as file pickers with multipart upload\n- **`HAIRA_DISABLE_UI=true`** — disable all auto-UIs for production\n\n## Multi-Agent with Parallel Execution\n\n```haira\n@post(\"/api/analyze\")\nworkflow Analyze(topic: string) -\u003e { results: [string] } {\n    results = spawn {\n        Researcher.ask(\"Find facts about ${topic}\")\n        Critic.ask(\"Find counterarguments about ${topic}\")\n        Summarizer.ask(\"Write a summary about ${topic}\")\n    }\n    return { results: results }\n}\n```\n\n## MCP (Model Context Protocol)\n\nHaira has built-in MCP support in both directions — consume external tools and expose workflows as tools.\n\n### MCP Client — Use External Tools\n\nConnect to any MCP server. The agent discovers and uses its tools automatically:\n\n```haira\nimport \"http\"\n\nprovider filesystem {\n    transport: \"mcp\"\n    command: \"npx\"\n    args: [\"-y\", \"@modelcontextprotocol/server-filesystem\", \"/tmp\"]\n}\n\nagent Assistant {\n    model: openai\n    system: \"You are a helpful assistant with file system access.\"\n    mcp: [filesystem]\n}\n```\n\nSSE transport works too — connect to remote MCP servers over HTTP:\n\n```haira\nprovider remote_tools {\n    transport: \"mcp\"\n    endpoint: \"http://tools-server:9000/sse\"\n}\n```\n\n### MCP Server — Expose Workflows as Tools\n\nAny workflow can be exposed as an MCP tool for external agents (Claude Code, Cursor, other Haira agents):\n\n```haira\nimport \"mcp\"\n\nworkflow Summarize(text: string) -\u003e { summary: string } {\n    \"\"\"Summarize the given text into key points.\"\"\"\n    summary, err = Summarizer.ask(text)\n    if err != nil { return { summary: \"Error.\" } }\n    return { summary: summary }\n}\n\nfn main() {\n    mcp_server = mcp.Server([Summarize])\n    mcp_server.listen(9000)  // SSE on http://localhost:9000/sse\n}\n```\n\nBoth transports are supported:\n- `mcp_server.serve()` — stdio (for subprocess integration)\n- `mcp_server.listen(9000)` — SSE over HTTP (for remote agents)\n\n### Distributed Agent Network\n\nCombine MCP client + server + handoffs for cross-machine agent orchestration:\n\n```\nServer A (Summarizer)  \u003c--MCP--\u003e  Server B (Translator)\n       ^                                ^\n       +-------- MCP ---- Server C (Orchestrator)\n```\n\n## Benchmarks\n\nMeasured on Apple Silicon (M-series). Competitor numbers from published benchmarks and framework documentation.\n\n### Compiler Performance\n\n| Phase | 35 examples | Per file |\n|-------|-------------|----------|\n| Lex | 85ms | ~2.9ms |\n| Parse | 80ms | ~2.8ms |\n| Codegen (emit Go) | 86ms | ~3.0ms |\n| Full build (agentic) | 440ms | -- |\n\n### Runtime Performance\n\n| Metric | Haira | Python + LangGraph | Python + CrewAI | Node.js + Vercel AI SDK |\n|--------|-------|--------------------|-----------------|-----------------------|\n| **Startup time** | **18ms** | ~1000ms | ~700ms | ~200ms |\n| **Memory (idle)** | **11 MB** | ~200 MB | ~150 MB | ~100 MB |\n| **Binary / deploy size** | **11 MB** | ~500 MB+ (Docker) | ~400 MB+ (Docker) | ~300 MB+ (Docker) |\n| **HTTP req/sec** | **~19,000** | ~1,000-3,000 | ~1,000-3,000 | ~6,000-8,000 |\n| **Dependencies** | **0** | 50-200 packages | 50-150 packages | 100-300 packages |\n\n### Usability: Lines of Code\n\n| Task | Haira | LangGraph | CrewAI | Vercel AI SDK |\n|------|-------|-----------|--------|---------------|\n| Agent + tool + HTTP server | **47 lines, 1 file** | ~130 lines, 3-5 files | ~100 lines, 2-4 files | ~90 lines, 3-4 files |\n| Multi-agent handoffs | **48 lines** | ~200+ lines | ~120 lines | ~150+ lines |\n| MCP client integration | **39 lines** | N/A | N/A | ~80 lines |\n| MCP server (expose as tool) | **32 lines** | N/A | N/A | N/A |\n\n### Feature Comparison\n\n| Capability | Haira | LangGraph | CrewAI | AutoGen | Vercel AI SDK |\n|------------|-------|-----------|--------|---------|---------------|\n| Custom tools | First-class keyword | Decorator | Decorator/class | Function | Zod schema |\n| Generative UI | Built-in (`ui.*`) | No | No | No | React components |\n| Multi-agent | Handoffs (built-in) | Graph edges | Role delegation | Conversations | Manual |\n| MCP client | Built-in | Via plugin | No | No | Plugin |\n| MCP server | Built-in | No | No | No | No |\n| HTTP server | Built-in | Manual (Flask) | No | No | Via Next.js |\n| SSE streaming | `-\u003e stream` keyword | Manual | No | No | Built-in |\n| WebSocket (ARP) | Built-in | No | No | No | No |\n| Memory/sessions | Language keyword | Checkpointer | Config | Config | Manual |\n| Type safety | Compile-time | Runtime | Runtime | Runtime | TypeScript |\n| Parallel execution | `spawn { }` | `Send()` API | Task config | Group chat | `Promise.all` |\n| Auto UI | Built-in | No | No | No | No |\n| Observability | Built-in + Langfuse | Via callbacks | Via callbacks | Via callbacks | Via callbacks |\n| Deploy | Single binary | Docker + venv | Docker + venv | Docker + node_modules | Docker + node_modules |\n| Agent evaluation | `eval` keyword | Custom code | Custom code | Custom code | Custom code |\n| Cross-harness export | `--target claude-code` | No | No | No | No |\n| Tool hooks | `@before`/`@after` | Via wrappers | No | No | Middleware |\n\n## Getting Started\n\nFor full documentation, visit **[haira.dev/docs](https://haira.dev/docs/getting-started/installation)**.\n\n### Quick Install\n\n```bash\ncurl -fsSL https://haira.dev/install.sh | sh\n```\n\n### Build from Source\n\nRequires Go 1.22+.\n\n```bash\nmake build\n```\n\n### Run\n\n```bash\n# Compile and run\n./compiler/haira run examples/01-hello.haira\n\n# Build a native binary\n./compiler/haira build examples/07-agentic.haira -o myapp\n\n# Show generated Go code\n./compiler/haira emit examples/07-agentic.haira\n\n# Type-check only\n./compiler/haira check examples/01-hello.haira\n\n# Run agent evaluations\n./compiler/haira eval examples/eval.haira\n\n# Export to Claude Code format\n./compiler/haira build examples/07-agentic.haira --target claude-code\n```\n\n### Install Locally\n\n```bash\nmake install-local    # installs to ~/.local/bin/haira\n```\n\n## Project Structure\n\n```\nhaira/\n├── compiler/                   # Compiler (Go)\n│   ├── main.go                 # CLI: build, run, parse, check, lex, emit, test, fmt, lsp\n│   └── internal/\n│       ├── token/              # Token types\n│       ├── lexer/              # Hand-written scanner\n│       ├── ast/                # AST node types\n│       ├── parser/             # Recursive descent + Pratt parsing\n│       ├── checker/            # Type checker + semantic analysis\n│       ├── resolver/           # Name resolution\n│       ├── codegen/            # Go code generation\n│       ├── errors/             # Diagnostic system\n│       ├── lsp/                # Language server protocol\n│       ├── driver/             # Pipeline orchestrator\n│       └── runtime/            # Embedded UI bundle (bundle.tar.gz)\n├── primitive/haira/            # Core runtime (Go)\n│   ├── agent.go                # Agent execution, streaming, handoffs\n│   ├── provider.go             # LLM provider config\n│   ├── tool.go                 # Tool registry\n│   ├── workflow.go             # Workflow definitions\n│   ├── server.go               # HTTP server, SSE, auto UI routing\n│   ├── arp.go                  # ARP protocol types + bridge\n│   ├── arp_ws.go               # ARP WebSocket transport\n│   ├── mcp_client.go           # MCP client (stdio + SSE)\n│   ├── mcp_server.go           # MCP server (stdio + SSE)\n│   ├── memory.go               # Session memory store\n│   ├── store.go                # Session persistence interface\n│   ├── observe.go              # Observability / telemetry\n│   ├── upload.go               # File upload handling\n│   └── ui_*.go                 # Generative UI components + tools\n├── stdlib/                     # Standard library (tree-shaken)\n│   ├── postgres/               # PostgreSQL client\n│   ├── sqlite/                 # SQLite store backend\n│   ├── excel/                  # Excel file generation\n│   ├── vector/                 # Vector embeddings + search\n│   ├── slack/                  # Slack integration\n│   ├── github/                 # GitHub API client\n│   ├── gitlab/                 # GitLab API client\n│   ├── d1/                     # Cloudflare D1 store backend\n│   ├── agents/                 # Pre-built agent templates\n│   ├── auth/                   # API key resolution\n│   └── langfuse/               # Langfuse observability exporter\n├── ui/sdk/                     # UI SDK (TypeScript, Lit web components)\n│   └── src/\n│       ├── core/               # Types, styles, ARP client\n│       ├── components/         # Chat, form, generative UI components\n│       ├── pages/              # App shell pages\n│       └── services/           # SSE client\n├── spec/                       # Language specification\n│   ├── latex/                  # 18-chapter spec (LaTeX)\n│   └── arp/                    # ARP protocol spec + component catalog\n├── examples/                   # 35 example programs\n├── poc/                        # Real-world proof of concepts\n│   ├── coding-agent/           # AI coding assistant\n│   ├── cloudflare-agent/       # Cloudflare Workers agent\n│   ├── data-explorer/          # AI-powered data querying + visualization\n│   ├── devops-incident/        # DevOps incident management\n│   ├── pipeline-form/          # Multi-step pipeline with forms\n├── editors/zed-haira/          # Zed editor extension\n├── tree-sitter-haira/          # Tree-sitter grammar\n└── Makefile\n```\n\n## Examples\n\nAll 35 examples compile and run:\n\n```bash\nmake build-examples    # compile all\nmake run-examples      # run non-agentic examples\n```\n\n| Example | Description |\n|---------|-------------|\n| 01-hello | Hello world |\n| 02-variables | Variable declarations |\n| 03-functions | Functions, closures |\n| 04-control-flow | If/else, for, while |\n| 05-match | Pattern matching |\n| 06-lists | List operations |\n| 07-agentic | Agent with tools and webhook |\n| 08-structs | Struct types |\n| 09-string-interpolation | `${expr}` interpolation |\n| 10-maps | Map operations |\n| 11-pipes | Pipe operator |\n| 12-methods | Methods on types |\n| 13-error-handling | Try/catch, error propagation |\n| 14-multi-agent | Multiple agents and providers |\n| 15-handoffs | Agent-to-agent handoffs |\n| 16-enums | Enum types |\n| 17-compound-assign | `+=`, `-=`, etc. |\n| 18-defer | Defer statements |\n| 19-streaming | SSE streaming workflow |\n| 20-stdlib | Standard library showcase |\n| 21-file-upload | File upload with AI summarization |\n| 22-pipeline-ui | Workflow steps with pipeline UI |\n| 23-mcp | MCP client — agent with external tools |\n| 24-mcp-server | MCP server — expose workflows as tools |\n| 25-embeddings | Vector embeddings + similarity search |\n| 26-rag | Retrieval-augmented generation |\n| 27-structured-output | Typed agent output with structs |\n| 28-observe | Observability with Langfuse |\n| 29-testing | Testing workflows |\n| 30-type-aliases | Type alias definitions |\n| 31-spawn | Parallel spawn blocks |\n| 32-bitwise | Bitwise operators |\n| 33-lifecycle-hooks | Workflow lifecycle hooks |\n| 34-dynamic-agents | Runtime agent creation |\n| 35-stdlib-tools | Pre-built agent templates |\n\n## Learn More\n\n- **[Website](https://haira.dev)** — landing page and overview\n- **[Documentation](https://haira.dev/docs/getting-started/installation)** — installation, language guide, agentic features, stdlib reference\n- **[ARP Protocol](https://haira.dev/agentic-rendering-protocol)** — transport-agnostic protocol for agent-to-renderer communication\n- **[Generative UI](https://haira.dev/generative-ui)** — agents that render rich, interactive components\n- **[Language Specification (PDF)](https://haira.dev/haira-spec.pdf)** — full formal language specification\n- **[Changelog](https://github.com/mrzdevcore/haira/blob/main/CHANGELOG.md)** — release history\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrzdevcore%2Fhaira","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrzdevcore%2Fhaira","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrzdevcore%2Fhaira/lists"}