# Yao โ€” App Runtime for the AI Era Yao is an open-source runtime for building AI agents and web applications โ€” shipped as a single binary. ![Mission Control](docs/mission-control.png) **๐Ÿ  Homepage:** [https://yaoagents.com](https://yaoagents.com) **๐Ÿ“š Docs:** [https://yaoagents.com/docs](https://yaoagents.com/docs) **๐Ÿ–ฅ๏ธ Yao Desktop:** [https://yaoagents.com/download](https://yaoagents.com/download) --- ## How It Works Think of Yao Agent as a **cage, not an animal**. What you put inside determines the behavior; the cage keeps it controlled. Every request flows through the same pipeline: ![Pipeline](docs/pipeline.png) `Create Hook` runs before the executor โ€” inject context, enforce constraints, route requests. `Next Hook` runs after โ€” validate output, trigger downstream actions, drive multi-step loops. **The AI does the heavy lifting. You define the boundaries.** ### Three Modes | Mode | Executor | When to use | |------|----------|-------------| | **LLM** | OpenAI, Anthropic, etc. | Conversational assistants, Q&A, content generation | | **CLI Agent** | OpenCode, Claude Code, Codex in a container | Computer use, sandbox isolation, SKILL ecosystem | | **Pure Hook** | Your own TypeScript code | Deterministic logic, routing, menu flows โ€” no AI needed | All three share the same Hook interface. You can mix them freely โ€” route some requests through the LLM, handle others with pure code, all inside a single `Create Hook`. --- ## Features ### Agent Framework - **TypeScript Hooks** โ€” `Create` and `Next` hooks intercept every request; built-in V8 engine - **Native MCP Support** โ€” Connect tools via process, SSE, or STDIO transport - **Memory API** โ€” Four scopes: request-level, session, user, team - **Multi-Agent** โ€” Delegate to specialist agents or call agents in parallel - **CLI Agent / Sandbox** โ€” Run Claude Code (or other CLI runners) in an isolated container with VNC desktop support - **Skills Ecosystem** โ€” Drop reusable capability packs (`SKILL.md`) into any CLI Agent ### Full-Stack Runtime Everything in a single executable: - **Data Models** โ€” Define database tables and relations in JSON/YAML - **REST APIs** โ€” Map routes to model queries or TypeScript processors - **SUI Pages** โ€” Component-based web UI with server-side rendering - **Chat UI (CUI)** โ€” Built-in conversation interface for agents - **TypeScript** โ€” Built-in V8 engine; no Node.js required - **Single Binary** โ€” Runs on ARM64/x64; no Python, Node, or containers needed on the host ### Built-in Search - **Vector Search** โ€” Embeddings with OpenAI or FastEmbed - **Knowledge Graph** โ€” Entity-relationship retrieval - **GraphRAG** โ€” Hybrid vector + graph search --- ## About the Name Yao (็ˆป, yรกo) is the fundamental symbol in the I Ching โ€” the building block of the eight trigrams. Like a binary digit, it has two states. Their combinations describe the patterns of everything.