Files
zeekayandHanzo Dev ff7d100496 Everything that calls the control plane calls /v1
The server mounts /v1, /v1/ui and /v2/ui. The UI and its dev proxy, the helm
and kubernetes health probes, functional tests, project templates, examples
and scripts still called /api/v1, so the probes failed and the UI's requests
missed.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-11 04:10:35 -07:00

63 lines
1.5 KiB
Cheetah

# {{.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/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/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}}