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
pip install -r requirements.txt
```
2. **Start the Hanzo Agents server** (in another terminal):
```bash
af server
```
3. **Run the agent:**
```bash
python main.py
```
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}}.demo_echo \
-H "Content-Type: application/json" \
-d '{"input": {"message": "Hello World"}}'
```
### Enable AI Features
1. Uncomment the `ai_config` in `main.py`
2. Set your API key: `export OPENAI_API_KEY=sk-...`
- Or use `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, etc. for other providers
- LiteLLM auto-detects the provider from the model name
3. Uncomment the `analyze_sentiment` reasoner in `reasoners.py`
4. Restart the agent
```bash
curl -X POST http://localhost:8080/api/v1/execute/{{.NodeID}}.demo_analyze_sentiment \
-H "Content-Type: application/json" \
-d '{"input": {"text": "I love this product!"}}'
```
## Project Structure
- `main.py` - Agent configuration and startup
- `reasoners.py` - Reasoner definitions (AI-powered functions)
- `requirements.txt` - Python dependencies
- `.env.example` - Environment variable examples
## Learn More
- [Hanzo Agents Documentation](https://hanzo_agents.ai/docs)
- [SDK Reference](https://hanzo_agents.ai/docs/sdk)
---
Created by {{.AuthorName}} ({{.AuthorEmail}}) on {{.CreatedAt}}