mirror of
https://github.com/hanzoai/agents.git
synced 2026-10-30 18:48:36 +00:00
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.
28 lines
763 B
Python
28 lines
763 B
Python
import base64
|
|
from hanzo_agents.multimodal_response import AudioOutput, ImageOutput, FileOutput
|
|
|
|
|
|
def test_audio_output_save_and_get_bytes(tmp_path):
|
|
data = base64.b64encode(b"abc").decode()
|
|
ao = AudioOutput(data=data, format="wav")
|
|
p = tmp_path / "a.wav"
|
|
ao.save(p)
|
|
assert p.read_bytes() == b"abc"
|
|
assert ao.get_bytes() == b"abc"
|
|
|
|
|
|
def test_image_output_save_from_b64(tmp_path):
|
|
b64 = base64.b64encode(b"img").decode()
|
|
io = ImageOutput(b64_json=b64)
|
|
p = tmp_path / "i.png"
|
|
io.save(p)
|
|
assert p.read_bytes() == b"img"
|
|
|
|
|
|
def test_file_output_save_from_b64(tmp_path):
|
|
b64 = base64.b64encode(b"file").decode()
|
|
fo = FileOutput(data=b64)
|
|
p = tmp_path / "f.bin"
|
|
fo.save(p)
|
|
assert p.read_bytes() == b"file"
|