Skip to content
DocumentationTry Hanzo
Hanzo Agents · Python SDK

A Python SDK for agents that work together

An agent is a model, a set of instructions, and the tools it may call. A network is several of them behind a router that decides which one gets the turn. Both are a few lines.

Open source, MIT. pip install hanzo-agent. Works against any endpoint that speaks the Chat Completions format, so it runs on Hanzo or on your own serving stack.

Available throughPythonMCP toolsHanzo Cloud
A node graph: agents, the tools they reach for, and the edges between them.
What is Hanzo Agents

One agent, or several with a router between them

The hard part of multi-agent work is not the prompting. It is deciding who answers, keeping what they learn where the next one can read it, and being able to see afterwards what actually ran.

01

Agents

Agent(name, instructions, tools=[...]) and Runner.run_sync(agent, "…"). The result carries final_output plus every step it took to get there.

02

Networks

create_network(agents=[researcher, writer], router=SemanticRouter()) puts specialists behind one call. Route on meaning, on rules you write, or by load — and swap the router without touching the agents.

03

Tools

A tool is a Python function with a signature. Every Hanzo MCP tool is one too, so an agent gets a shell, a filesystem, a code index and HTTP without you writing wrappers for them.

What comes with it

The parts you would otherwise write yourself

Routing you can choose

SemanticRouter reads the request and picks. Rule-based routing does what you say. Load-balanced routing spreads turns across equals. Same network object either way.

Workflows, not just chat

Steps that run in parallel, branch on a condition, or loop until something holds — for the work where the order matters and a prompt cannot express it.

Shared state

Agents in a network read and write one state object, so the writer sees what the researcher found without you pasting it into the next prompt.

Memory with retrieval

A store, a retriever, and vector search over both, so an agent recalls the relevant part of a long history instead of replaying all of it.

Tracing

Spans and traces around every model call, tool call and handoff, through a processor interface you can point at your own collector.

Extras you opt into

pip install "hanzo-agent[tee]" adds attestation for confidential runs. [web3] adds wallets and on-chain identity. [cli] adds the command line. Nothing you skip is loaded.

Get started

Two agents and a router

python
pip install hanzo-agent

from agents import Agent
from agents.network import create_network, SemanticRouter

researcher = Agent(
    name="Researcher",
    instructions="You find and analyze information.",
    tools=[search_tool, analyze_tool],
)

writer = Agent(
    name="Writer",
    instructions="You create content based on research.",
    tools=[format_tool],
)

network = create_network(agents=[researcher, writer], router=SemanticRouter())

result = await network.run("Research and write about quantum computing")

Write the first one

pip install hanzo-agent, give it instructions and a tool, and run it.

Open source

License: Apache-2.0hanzoai

Get Agents

Multi-agent SDK + runtime + tool harness