Try Hanzo
Hanzo Agent · SDK

An Agent SDK for networks 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 — backed by a pure-Rust runtime (hanzoai/dev) and the Hanzo AI gateway (hanzoai/ai).

Open source (hanzoai/agent). pip install hanzo-agent or cargo add hanzo-agent. Works against api.hanzo.ai or any endpoint that speaks Chat Completions and MCP.

Available throughRustPythonGoTypeScriptMCP toolsHanzo Cloud
Agents — Hanzo
api.hanzo.ai/v1/agentOpen in the console
Example project. Every name in it is one you would give your own.

What is Hanzo Agent

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 running tools inside a fast, sandboxed Rust harness.

01

Pure-Rust Core & Multi-Language SDKs

Built on hanzo-agent (Rust) and the hanzoai/dev Rust harness for sandboxed execution, with first-class SDKs in Rust, Python, Go, and TypeScript (hanzoai/agent).

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 & MCP

Every Hanzo MCP tool (260+ tools across files, AST, shell, browser, Kai, and 125 Cloud services) mounts over stdio or streamable HTTP without custom wrappers.

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
# Rust (cargo add hanzo-agent hanzo-agents) · 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.

Get Agents

Multi-agent SDK + runtime + tool harness

License: Apache-2.0hanzoai