Hya Documentation
Agents built for the long horizon — verified at every step, modular by design.
Hya is an open-source multi-agent coding runtime that runs locally in your terminal, browser, and editor, connects to any model provider you choose, and keeps your code and conversation history on your own machine.
Pick where you want to start based on what you’re doing today:
1. Using Hya (For Everyone)
New to Hya, or looking up how to run a workflow, switch models, or connect from another machine? Start here.
Get Started
- What is Hya? — How the terminal UI, browser WebUI, background server, and offline mode fit together.
- Installation — One-line install on Linux, macOS, and Windows (WSL 2), plus
hya updateand source builds. - 5-Minute Quickstart — Launch Hya, add an API key or OAuth login, edit code, approve prompts, and
/undochanges. - Common Workflows — Copy-paste recipes for exploring code, fixing bugs, running on autopilot, and working remotely.
Guides
- Interactive Mode (TUI & WebUI) — Layouts (
tui.tomlpresets),@file&!shell, clipboard/browser file paste,/undo&/fork, and management screens. - Editor Integration (ACP) — Connecting Zed and other ACP v1 code editors directly to your local Hya daemon via
hya acp. - Headless & Automation — Running Hya in scripts and CI with
hya exec,--bare,-pGoal mode, andhya loop. - Models, Providers & Auth — Connecting Anthropic, OpenAI, Gemini, Grok, or local models via
/key, OAuth, ormodels.toml, with catalog discovery and model roles. - Projects, Permissions & Safety — Multi-root Projects, checkout trust, permission modes, and
permissions.toml. - Context, Memory & Compaction — Teaching Hya project rules with
AGENTS.mdand how Hya shrinks long chats automatically at 80%. - Subagents & Multi-Agent Teams — Built-in roles (
hya-main,hya-plan,hya-task,hya-scout,hya-reviewer),/subagents, and vertical channels. - Workflows — Running multi-stage
*.hya.mdpipelines from/workflowor the CLI. - Skills, Custom Commands & MCP — Loading
SKILL.mdguides, writing/commands, connecting MCP tool servers, and Code Mode. - Background Server & Remote Relay — Controlling
hya serveand connecting across machines over end-to-end encryptedhya://links. - Migrating from Hya v1 to v2 — Upgrading v1 SQLite databases,
config.yaml,tui.toml/tui.json, and user bundles withhya-migrationand SHA-256 verified rollback. - Migrating from Config v2 to v3 — Atomic offline
hya-migration runupgrade fromconfig.yaml,auth/*.yaml, andtui.jsontoconfig.tomlv3,models.toml,auth.json(0600), andtui-state.jsonwith SHA-256 verified rollback.
Reference Manuals
- CLI Reference — Commands, global flags, configuration and profile inspection, migration, and exit codes.
- Configuration Reference — Config v3 TOML, profiles, Project layers, models and bundle settings, and TUI preferences.
- Slash Commands & Keybindings — Every
/command, keyboard shortcut, and/keybindcustomization. - Built-in Tools, Agents & Bundles — All 8 Core
hya-baretools + Code Mode, built-in agents, 21 official profile packages, andhya-extra/*bundles. - Environment Variables & File Paths — XDG and
HYA_HOMEroots, file locations, and environment overrides. - Troubleshooting — Quick fixes for busy ports, daemon locks,
403host errors, offline mode, and relay setup.
2. Extending & Integrating Hya (For Plugin & App Developers)
Customize Hya or build your own apps and scripts on top of it—without touching Hya’s core Rust source code.
- Extending Hya: Overview — Decision table:
AGENTS.mdvs Skills vs Commands vs Workflows vs MCP vs.hyabundlevs Native ABI v2 vs TUI Extensions. - Authoring Skills & Slash Commands —
SKILL.mdfrontmatter, discovery precedence, and.hya/commands/*.mdargument templates. - Authoring Workflows & Evaluators — Writing
*.hya.mdStage DAGs, loop verifiers, per-stage model routing, and custom Goal/Loop judges. - Developing, Installing & Publishing Bundles (
.hyabundle) — Authoring static, JS/TS, and Native ABI v2 bundles, installing from registries/local files/mirrors/Git/--claude, and publishing to static registries. hyabundleSpecification — Canonicalschema_version: 2bundle.yaml& descriptor schemas, 21 official profile packages,overrides: hya/bare, loading precedence, and independent bundle releases.- Open Static Registry Protocol v1 — Bundle discovery, profiles, offline mirrors, and Sigstore provenance.
- Native Bundle Runtime ABI v2 — Writing compiled Rust
cdylibbundles withcrates/hya-runtime-abi,Arc<dyn HostRuntime>,NativeRegistrations, andExtensionPlanes. - Sidecar Plugins, Custom Tools & Hooks — Writing Bun JS modules or NDJSON JSON-RPC 2.0 plugins,
host/capabilitycalls, and all 20 hooks. - TUI Extensions (
@hya/tui-sdkv2) — Building sandboxed custom UI panels, dynamic panes, slash commands, status items, renderers, and embedded transcripts. hya.v2Protocol Overview ·hya-sdkReference & Client Integration · Generated API Reference · OpenAPI Schema — Driving Hya over/v2HTTP/JSON+SSE+WebSocket, gRPC,BundleApi, or Rusthya-sdk.
3. Architecture & Contributing (For Core Contributors)
Working inside the hya repository or exploring how the runtime is built?
- Architecture Overview — Event-sourced truth (
Event::Extension),hya-bare3-primitive Kernel + 21 modular built-in bundles, persistent daemon, single-porthya.v2, and system diagrams. - Repository & Crate Map — Workspace crates, native tool bundles, frontend packages, and where to make a change.
- Kernel & Context Engine · Event Model & Storage · Session Engine, Subagents & Channels · Providers, Tool Plane & Scoping · Server, Relay & Frontend Internals · Domain Glossary
- Development & Coding Standards · Plan Template · Testing & Verification · Dev Tooling (
xtask) & Docs Site · Versioning & Release Guide