Hanzo Kata is the autonomous coding agent and self-healing CI/CD triage loop:
- Ingest compiler errors, lint warnings, or test failures from terminal output or CI logs.
- Search repository AST and dependency graphs for the root cause.
- Generate minimal, auditable unified diff patches using Zen5-Coder or Enso.
- Run validation checks (
cargo check,npm test,pytest) and gate automated commits vs. human escalation.
- Cloud Endpoint:
POST https://api.hanzo.ai/v1/chat/completions - Models:
zen5-coder,zen,enso-pro - System Card: Autonomous Agent Architecture & Benchmarks
- Docs: docs.hanzo.ai
Set HANZO_API_KEY:
# Option 1: Automatic login via Hanzo CLI
curl -fsSL https://hanzo.sh | sh
hanzo auth login
export HANZO_API_KEY="$(hanzo auth token)"
# Option 2: Generate via Web Console
# Visit https://platform.hanzo.ai/keys and create an API key
export HANZO_API_KEY="sk_live_..."Runnable client examples across languages in examples/:
- Python:
examples/python/coding_agent.py(Autonomous repair loop) - TypeScript:
examples/typescript/coding_agent.ts(Native fetch) - Go:
examples/go/main.go(Standardnet/http) - Rust:
examples/rust/(Type-safe client withreqwest) - cURL:
examples/curl/agent.sh(One-liner script)
# Quick run (Python)
python3 examples/python/coding_agent.py
# Quick run (cURL)
./examples/curl/agent.shkata-agent/ provides Hanzo's minimal, malleable, crash-resilient Rust agent harness:
- Pluggable
Storage+ Conformance Suite:MemoryStorage,JsonlStorage, and WAL-backedSqliteStoragekeeping only the active working set in memory. - Pluggable
ExecutionEnv:LocalExecutionEnvandMemoryExecutionEnvper conversation/tool call. - Crash Recovery (
Harness::resume) &request_idIdempotency: CheckpointedModelCallandToolCalltasks withReplayPolicy(SafevsInterrupt) plus exactly-onceSubmissionInput::with_request_id. - Concurrent Conversations, O(1) CoW
fork, & 3-TierOwnership: Shared lineage forks without copying history,Ownership(Task,Conversation,Ownerless) abort cascades,WhenBusy(Queue/Steer), versionedDocSpec<T>(AsOf),compact/reset_with_handoff+search_history,CodingTools,wrap_toolmiddleware, and durablememo.
recipes/: Modular state machine and repair loop for Rust services:
KataAgentLoopRecipe: Self-healing test-and-repair state machine that ingests failing compiler/test output and generates unified diffs.TriageAction: Evaluates test exit codes (ApplyPatch,ReRunTests,EscalateToHuman).
use kata_recipes::{CodingTriageState, KataAgentLoopRecipe};
let state = CodingTriageState {
repo_name: "myorg/core".into(),
branch: "fix/leak".into(),
failing_step: "cargo test".into(),
stdout_stderr: "error[E0308]: mismatched types".into(),
files_modified: vec!["src/lib.rs".into()],
max_attempts: 3,
current_attempt: 1,
};
let prompt = KataAgentLoopRecipe::build_patch_prompt(&state);