mirror of
https://github.com/hanzoai/agents.git
synced 2026-10-30 18:48:36 +00:00
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.
4.5 KiB
4.5 KiB
Hanzo Agents Architecture
Hanzo Agents provides a modular platform for orchestrating AI agents. The system is composed of a Go-based control plane, SDKs for client languages, and optional runtime services.
High-Level Overview
┌───────────────────────────────────────────────────────────────┐
│ Clients │
│ - Web UI (`control-plane/web`) │
│ - Python SDK (`sdk/python`) │
│ - Go SDK (`sdk/go`) │
└───────────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌───────────────────────────────────────────────────────────────┐
│ Control Plane │
│ - REST + gRPC API (`cmd`, `internal/handlers`) │
│ - Workflow engine (`internal/workflows`) │
│ - Credential management (`internal/services`) │
│ - Persistence + migrations (`migrations`, `pkg/db`) │
│ - Configuration (`config`) │
└───────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────────────────────────┐
│ External Dependencies │
│ - PostgreSQL, vector stores (configurable) │
│ - Observability stack (OpenTelemetry, Prometheus, etc.) │
│ - Pluggable LLM providers (via SDKs) │
└───────────────────────────────────────────────────────────────┘
Control Plane
The control plane orchestrates agent workflows, provides API endpoints, manages credentials, and serves a React-based administration UI.
cmd/– entry points for binaries (HTTP server, background workers).internal/– business logic, services, repositories, and use-cases.pkg/– reusable packages (database, telemetry, utility helpers).proto/– Protocol Buffers and generated gRPC service definitions.web/– Control plane UI built with TypeScript + React.migrations/– Database schema migrations (Goose).config/– Default configuration, environment templates, sample secrets.
Data Flow
- SDKs or the web UI call into the REST/gRPC API.
- The API handler invokes services in
internal/services. - Services interact with repositories (
internal/repositories) and utilities. - Background jobs and workflows are queued via
internal/workflows. - Persistent state lives in PostgreSQL (default) and is versioned by
migrations.
SDKs
Python (sdk/python)
- Thin client for the control plane REST API.
- Async and sync helpers for agent execution.
- Type hints for common primitives.
- PyPI-ready project built with
pyproject.toml.
Go (sdk/go)
- Idiomatic Go client with
agent,client,types, andaipackages. - Implements interfaces shared by the control plane.
- Ready for consumption via
go get.
Deployment
deployments/docker/Dockerfile.control-planebuilds the Go binary and bundles the web UI.deployments/docker/Dockerfile.python-agentandDockerfile.go-agentprovide reference runtime images.deployments/docker/docker-compose.ymlorchestrates a local stack (control plane + dependencies).
Extensibility
- Replace the default persistence layer by implementing interfaces in
pkg/db. - Add new transports (e.g., GraphQL, WebSockets) via
cmd/entry points. - Extend SDKs by adding new modules in their respective directories.
For operational details, see docs/DEVELOPMENT.md and docs/SECURITY.md.