🤝
Frameworks
Use Hanzo AI with AutoGen
Build multi-agent systems with Microsoft AutoGen using Hanzo AI as the LLM backend. Hanzo's OpenAI-compatible API works seamlessly with AutoGen's agent orchestration.
Base URL: https://api.hanzo.ai/v1
API Key: Get yours at hanzo.ai/signup · Fully OpenAI-compatible · 390+ models available
🤝
Created by Microsoft Research
License: MIT · View source on GitHub →
Hanzo AI is OpenAI-compatible, so existing AutoGen code works with zero refactoring. We deeply appreciate the Microsoft Research team for building and maintaining this open-source project.
AutoGen setup
python
pip install pyautogen
import autogen
config_list = [{
"model": "zen4-pro",
"api_key": "your-hanzo-api-key",
"base_url": "https://api.hanzo.ai/v1",
}]
assistant = autogen.AssistantAgent(
name="assistant",
llm_config={"config_list": config_list},
)
user_proxy = autogen.UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
)
user_proxy.initiate_chat(assistant, message="Write a Python script to sort a list.")Multi-agent conversation
python
coder = autogen.AssistantAgent(
name="coder",
llm_config={"config_list": config_list},
system_message="You write clean Python code.",
)
reviewer = autogen.AssistantAgent(
name="reviewer",
llm_config={"config_list": config_list},
system_message="You review code for bugs.",
)
groupchat = autogen.GroupChat(agents=[user_proxy, coder, reviewer], messages=[])
manager = autogen.GroupChatManager(groupchat=groupchat, llm_config={"config_list": config_list})Code execution agent
python
user_proxy = autogen.UserProxyAgent(
name="user_proxy",
human_input_mode="NEVER",
code_execution_config={"work_dir": "coding", "use_docker": False},
)Environment setup
bash
export HANZO_API_KEY="your-hanzo-api-key"
# AutoGen picks up OAI_CONFIG_LIST or inline config
# No extra env vars needed — just point base_url to HanzoReady to get started?
Create a free account and get your API key. 100K API calls/month free forever.