Files
agents/docs/DEVELOPMENT.md
zeekayandGitHub 5b5cf9e9db feat: merge AgentField control plane + SDKs as Hanzo Agents (#1)
Transforms hanzoai/agents from a marketplace config repo into a full
agent orchestration platform by merging the AgentField infrastructure:

- Go control plane (K8s-like agent orchestration, service mesh, DAG workflows)
- Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC)
- TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows)
- Go SDK (idiomatic agent builder + client)
- React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI)
- Docker/K8s/Helm deployment configs
- Examples: hello world, deep research, RAG, simulation, benchmarks
- Functional test suite across Python/Go/TypeScript

All references rebranded: AgentField → Hanzo Agents
- Module: github.com/hanzoai/agents/control-plane
- Python: hanzo_agents
- TypeScript: @hanzo/agents
- Go: github.com/hanzoai/agents/sdk/go
- Env vars: HANZO_AGENTS_*
- Config: hanzo-agents.yaml

Previous marketplace configs moved to config/ directory.
2026-02-09 18:53:09 -08:00

3.2 KiB

Development Guide

This document provides instructions for working on the Hanzo Agents monorepo locally.

Prerequisites

  • Go ≥ 1.23
  • Node.js ≥ 20 (for the control plane web UI)
  • Python ≥ 3.10
  • Docker (optional, for running the full stack)

Initial Setup

git clone https://github.com/hanzoai/agents.git
cd hanzo-agents
./scripts/install.sh

The install script performs:

  • go install of required tooling (e.g., golangci-lint, goose).
  • pip install -e . for the Python SDK and development dependencies.
  • npm install inside control-plane/web.

Directory Conventions

  • control-plane/ — Go services, migrations, and web UI.
  • sdk/go/ — Distributed as its own Go module (go get friendly).
  • sdk/python/ — Packaged with pyproject.toml for PyPI.
  • deployments/docker/ — Container builds to orchestrate the stack.
  • scripts/ — Automation entry points, used by CI and developers.

Useful Commands

Action Command
Build everything ./scripts/build-all.sh
Run tests ./scripts/test-all.sh
Format Go code make fmt
Tidy Go modules make tidy
Run the control plane cd control-plane && go run cmd/server/main.go
Run UI in development cd control-plane/web && npm run dev
Start local stack docker compose -f deployments/docker/docker-compose.yml up

Environment Variables

Copy control-plane/config/.env.example to .env (if available) and adjust:

  • HANZO_AGENTS_DATABASE_URL — PostgreSQL connection string.
  • HANZO_AGENTS_JWT_SECRET — Authentication secret (development only).

Database Migrations

cd control-plane
goose -dir ./migrations postgres "$HANZO_AGENTS_DATABASE_URL" status
goose -dir ./migrations postgres "$HANZO_AGENTS_DATABASE_URL" up

Frontend Development

The UI lives in control-plane/web. It is built with React + TypeScript.

cd control-plane/web
npm install
npm run dev

During development, run the Go server (go run cmd/server/main.go) for API endpoints. The UI uses environment variables in .env.local.

Testing

# Control plane
cd control-plane
go test ./...

# Go SDK
cd ../sdk/go
go test ./...

# Python SDK
cd ../python
pytest

Troubleshooting

  • Ensure Docker resources are sufficient (4 CPU, 8 GB RAM recommended).
  • Run make tidy if Go modules drift.
  • Delete .venv and rerun ./scripts/install.sh if Python deps conflict.
  • Clear control-plane/web/node_modules if UI builds fail after dependency upgrades.

Conventions

  • Follow Go, Python (PEP 8), and TypeScript style guides.
  • Keep environment-specific secrets out of the repository.
  • Use feature flags or configuration flags for experimental features.

Publishing Releases

See docs/RELEASING.md for end-to-end release steps, required secrets, and how to run dry-run builds via GitHub Actions.