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

42 lines
896 B
Cheetah

package main
import (
"context"
"log"
"os"
"github.com/hanzoai/agents/sdk/go/agent"
"github.com/hanzoai/agents/sdk/go/ai"
)
func main() {
cfg := agent.Config{
NodeID: "{{.NodeID}}",
Version: "1.0.0",
Hanzo AgentsURL: "http://localhost:8080",
ListenAddress: ":0", // Auto-discover available port
// 🔧 Uncomment to enable AI features:
// AIConfig: &ai.Config{
// Model: "gpt-4o",
// APIKey: os.Getenv("OPENAI_API_KEY"),
// BaseURL: "https://api.openai.com/v1", // or "https://openrouter.ai/v1"
// Temperature: 0.7,
// MaxTokens: 4096,
// },
}
app, err := agent.New(cfg)
if err != nil {
log.Fatalf("Failed to create agent: %v", err)
}
// Register reasoners
registerReasoners(app)
// Start server
if err := app.Run(context.Background()); err != nil {
log.Fatalf("Server error: %v", err)
}
}