mirror of
https://github.com/hanzoai/agent.git
synced 2026-09-11 21:08:51 +00:00
Consolidate all Hanzo agent infrastructure into one repo: - control-plane/: Go control plane server (was agents-new) - sdk/: Go, Python, TypeScript SDKs - deployments/: Docker, Kubernetes, Helm configs - Dockerfile.sdk: Python SDK image (ghcr.io/hanzoai/agent:latest) - CI builds both SDK + control-plane images No more agentfield — everything is hanzoai/agent.
# {{.ProjectName}}
A Hanzo Agents agent created with `af init`.
## Quick Start
1. **Install dependencies:**
```bash
go mod download
```
2. **Start the Hanzo Agents server** (in another terminal):
```bash
af server
```
3. **Run the agent:**
```bash
go run .
```
The agent will auto-discover an available port and register with Hanzo Agents.
## Test the Agent
### Echo Reasoner (No AI Required)
```bash
curl -X POST http://localhost:8080/api/v1/execute/{{.NodeID}}.echo \
-H "Content-Type: application/json" \
-d '{"input": {"message": "Hello World"}}'
```
### Enable AI Features
1. Uncomment the `AIConfig` in `main.go`
2. Set your API key: `export OPENAI_API_KEY=sk-...`
- Or use `OPENROUTER_API_KEY` for OpenRouter
- Update `BaseURL` if using a different provider
3. Uncomment the `analyze_sentiment` reasoner in `reasoners.go`
4. Restart the agent
```bash
curl -X POST http://localhost:8080/api/v1/execute/{{.NodeID}}.analyze_sentiment \
-H "Content-Type: application/json" \
-d '{"input": {"text": "I love this product!"}}'
```
## Project Structure
- `main.go` - Agent configuration and startup
- `reasoners.go` - Reasoner definitions (AI-powered functions)
- `go.mod` - Go module dependencies
- `.env.example` - Environment variable examples
## Learn More
- [Hanzo Agents Documentation](https://hanzo_agents.ai/docs)
- [SDK Reference](https://hanzo_agents.ai/api/python-sdk/overview)
---
Created by {{.AuthorName}} ({{.AuthorEmail}}) on {{.CreatedAt}}