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.
33 lines
915 B
YAML
33 lines
915 B
YAML
{{- if .Values.demoPythonAgent.enabled -}}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "hanzo-agents.fullname" . }}-demo-python-agent
|
|
labels:
|
|
{{- include "hanzo-agents.labels" . | nindent 4 }}
|
|
data:
|
|
main.py: |
|
|
import os
|
|
|
|
from hanzo-agents import Agent
|
|
|
|
app = Agent(
|
|
node_id=os.getenv("AGENT_NODE_ID", "demo-python-agent"),
|
|
hanzo_agents_server=os.getenv("HANZO_AGENTS_URL", "http://localhost:8080"),
|
|
dev_mode=True,
|
|
)
|
|
|
|
@app.reasoner()
|
|
async def hello(name: str = "Hanzo Agents") -> dict:
|
|
return {"greeting": f"Hello, {name}!", "node_id": app.node_id}
|
|
|
|
@app.reasoner()
|
|
async def demo_echo(message: str = "Hello!") -> dict:
|
|
return {"echo": message, "node_id": app.node_id}
|
|
|
|
if __name__ == "__main__":
|
|
port = int(os.getenv("PORT", "8001"))
|
|
app.run(host="0.0.0.0", port=port, auto_port=False)
|
|
{{- end }}
|
|
|