2.7 KiB
Hanzo Gen
The agentic harness. gen launches a coding agent in your terminal with the
Hanzo MCP toolset attached, routes its model calls through api.hanzo.ai, and
streams the session live to mission control. Hanzo Dev is the default agent;
Claude Code, Codex, Cursor, Antigravity, Gemini, Qwen, OpenCode and the rest are
one flag away.
hanzo dev is Gen too: the Hanzo CLI links this crate, so gen and hanzo dev
take the same flags and run the same session.
Install
curl -fsSL hanzo.sh | sh
Gen signs in with your Hanzo account, the same one Hanzo Dev and the Hanzo CLI use. Sign in once:
hanzo auth login
Use
gen # an interactive Hanzo Dev session
gen "fix the failing test" # a task, run headless
gen --claude # Claude Code
gen --codex "add a test" # Codex, headless
gen --cursor # Cursor's agent
gen --gemini # any agent is a flag
gen --claude -- -c # args after -- go to the agent
gen --resume <id> # pick a linked session back up
gen --help # every flag
Routing
Every agent's model calls go to api.hanzo.ai, which serves Enso, Zen and Kai,
so one account and one bill cover every agent. Hanzo Dev routes there whenever
you are signed in. A third-party agent keeps its own login unless you pass
--cloud; with it, its calls route through api.hanzo.ai like Dev's. A few agents
have no way to name another endpoint (Cursor, Antigravity, Gemini, Copilot, Amp
and a handful more) and always use their own account. --model enso-ultra picks
the model on the Hanzo route.
When you are signed in, a session is registered with Hanzo cloud and its events
stream to mission control; --no-link keeps it local. Gen reads what the Hanzo
CLI has on file (hanzo config profile): hanzo config set code.link false keeps
every session local, and hanzo network use local points Gen at your own cloud. A
CLI too old to say keeps the session local on api.hanzo.ai until hanzo upgrade.
Examples & Integration
Runnable multi-turn assistant and tool-dispatch examples in examples/:
- Python:
examples/python/assistant.py(Two-turn tool calling loop) - TypeScript:
examples/typescript/assistant.ts(Native fetch assistant) - Go:
examples/go/main.go(Standardnet/httpconversational round) - Rust:
examples/rust/(Type-safe tool calling client withreqwest) - cURL:
examples/curl/assistant.sh(One-liner CLI query)
Build
cargo build --release
cargo test
License
MIT