Files
zeekayandGitHub 5b5cf9e9db feat: merge AgentField control plane + SDKs as Hanzo Agents (#1)
Transforms hanzoai/agents from a marketplace config repo into a full
agent orchestration platform by merging the AgentField infrastructure:

- Go control plane (K8s-like agent orchestration, service mesh, DAG workflows)
- Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC)
- TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows)
- Go SDK (idiomatic agent builder + client)
- React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI)
- Docker/K8s/Helm deployment configs
- Examples: hello world, deep research, RAG, simulation, benchmarks
- Functional test suite across Python/Go/TypeScript

All references rebranded: AgentField → Hanzo Agents
- Module: github.com/hanzoai/agents/control-plane
- Python: hanzo_agents
- TypeScript: @hanzo/agents
- Go: github.com/hanzoai/agents/sdk/go
- Env vars: HANZO_AGENTS_*
- Config: hanzo-agents.yaml

Previous marketplace configs moved to config/ directory.
2026-02-09 18:53:09 -08:00

30 lines
786 B
Python

"""Shared embedding helper built on FastEmbed for the doc chatbot."""
from __future__ import annotations
import os
from functools import lru_cache
from typing import Iterable, List
from fastembed import TextEmbedding
@lru_cache(maxsize=1)
def _load_model() -> TextEmbedding:
model_name = os.getenv("DOC_EMBED_MODEL", "BAAI/bge-small-en-v1.5")
return TextEmbedding(model_name=model_name)
def embed_texts(texts: Iterable[str]) -> List[List[float]]:
"""Embed an iterable of strings and return Python lists."""
model = _load_model()
embeddings = list(model.embed(list(texts)))
return [vector.tolist() for vector in embeddings]
def embed_query(text: str) -> List[float]:
"""Shortcut for single-question embeddings."""
return embed_texts([text])[0]