🚢
Frameworks
Use Hanzo AI with CrewAI
Use CrewAI to build collaborative AI agent teams powered by Hanzo AI models. CrewAI's role-based agents work with any OpenAI-compatible provider.
Base URL: https://api.hanzo.ai/v1
API Key: Get yours at hanzo.ai/signup · Fully OpenAI-compatible · 390+ models available
🚢
Created by CrewAI / João Moura
License: MIT · View source on GitHub →
Hanzo AI is OpenAI-compatible, so existing CrewAI code works with zero refactoring. We deeply appreciate the CrewAI / João Moura team for building and maintaining this open-source project.
CrewAI with Hanzo
python
pip install crewai
import os
os.environ["OPENAI_API_KEY"] = "your-hanzo-api-key"
os.environ["OPENAI_API_BASE"] = "https://api.hanzo.ai/v1"
os.environ["OPENAI_MODEL_NAME"] = "zen4-pro"
from crewai import Agent, Task, Crew
researcher = Agent(
role="Researcher",
goal="Find accurate information on AI trends",
backstory="Expert AI researcher with deep knowledge",
)
writer = Agent(
role="Writer",
goal="Write compelling summaries",
backstory="Technical writer specializing in AI",
)Tasks and Crew
python
task1 = Task(
description="Research the latest LLM benchmarks",
expected_output="A list of top 5 models and their scores",
agent=researcher,
)
task2 = Task(
description="Write a blog post based on the research",
expected_output="500-word blog post in markdown",
agent=writer,
)
crew = Crew(agents=[researcher, writer], tasks=[task1, task2])
result = crew.kickoff()Custom LLM config
python
from crewai import LLM
hanzo_llm = LLM(
model="zen4-pro",
api_key="your-hanzo-api-key",
base_url="https://api.hanzo.ai/v1",
)
agent = Agent(
role="Analyst",
goal="Analyze data",
backstory="Data analyst",
llm=hanzo_llm,
)Quick start
bash
pip install crewai
export OPENAI_API_KEY="your-hanzo-api-key"
export OPENAI_BASE_URL="https://api.hanzo.ai/v1"
crewai create my-crewReady to get started?
Create a free account and get your API key. 100K API calls/month free forever.