Skip to content
Try Hanzo
Language: English (United States)

An Agent SDK for networks that work together

Hanzo Agent · SDK

An agent is a model, a set of instructions, and the tools it may call.

api.hanzo.ai/v1/agentOpen in the console
Example project. Every name in it is one you would give your own.
pip install hanzo-agent

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

One agent, or several with a router between them

What is Hanzo Agent

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.

Two agents and a router

Get started

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")

The parts you would otherwise write yourself

What comes with it

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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

  6. 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.

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 ↗Deploy to Cloud