|
1 | | -# Hanzo Cloud - Claude Code Guide |
2 | | - |
3 | | -## Project Overview |
| 1 | +# ai — agent guide |
| 2 | + |
| 3 | +`hanzoai/ai` is the canonical **AI control plane** for the Hanzo platform: model |
| 4 | +hub, native Go model routing, RAG, and MCP/A2A management. It speaks the |
| 5 | +OpenAI-compatible `/v1` API, routes 66+ models to upstream providers, and meters |
| 6 | +every request. Renamed from `hanzoai/cloud` (HIP-0106); mounts as the `ai` |
| 7 | +subsystem inside `hanzoai/cloud`. In prod it runs as `cloud-api` on `hanzo-k8s`, |
| 8 | +fronted by `hanzoai/gateway` at `api.hanzo.ai`. |
| 9 | + |
| 10 | +**Canonical role.** This is a Hanzo *service/infra* repo — one impl, one place. |
| 11 | +It is NOT an SDK; SDKs link out to it. Completeness order across languages is |
| 12 | +Python → Rust → C++ → Go. Canonical spec: `~/work/hanzo/SDK-ARCHITECTURE.md`. |
| 13 | + |
| 14 | +**Brand rules (hard — enforce in every edit).** |
| 15 | +- Never call this an "LLM gateway" and never position it against LiteLLM — it is |
| 16 | + a full AI cloud / control plane, not a proxy. |
| 17 | +- `/v1/` only, never an `/api/` prefix. |
| 18 | +- Zen models are Hanzo's own family (`owned_by: hanzo`) — never name upstream models. |
| 19 | +- Voice: "Hanzo — the Open AI Cloud." Modern, crisp, developer-first. |
| 20 | + |
| 21 | +**Install / run.** |
| 22 | +```bash |
| 23 | +go build -race -ldflags "-extldflags '-static'" # build |
| 24 | +./cloud-api-server # run (env-configured) |
| 25 | +go test -v $(go list ./...) -tags skipCi # test (requires MySQL) |
| 26 | +docker compose up # local stack |
| 27 | +``` |
4 | 28 |
|
5 | | -Hanzo Cloud is an enterprise-level AI knowledge base and MCP (Model Context Protocol) / A2A (Agent-to-Agent) management platform. It supports 30+ AI model providers (OpenAI, Claude, Gemini, Ollama, etc.) with admin UI, user management, and SSO via Hanzo IAM. |
| 29 | +**Key entry points.** `main.go` (entry) · `bootstrap.go` (boot + replica |
| 30 | +assertion) · `routers/router.go` (all `/v1` routes) · `controllers/` (HTTP |
| 31 | +handlers) · `object/init.go` (init + LLM provider seeding) · `model/` (provider |
| 32 | +integrations) · `object/kms.go` (secret resolution) · `web/` (React admin UI). |
6 | 33 |
|
7 | 34 | ## Architecture |
8 | 35 |
|
9 | 36 | Full-stack application: |
10 | | -- **Backend:** Go 1.23.6 + Beego framework (MVC), MySQL/MariaDB |
| 37 | +- **Backend:** Go 1.26 + native web router (`github.com/hanzoai/ai/web`, served as `routers.App`; upstream beego dropped), MySQL/MariaDB/PostgreSQL |
11 | 38 | - **Frontend:** React + Ant Design v5, located in `web/` |
12 | 39 | - **Auth:** Hanzo IAM SSO integration |
13 | 40 |
|
|
0 commit comments