Files
hanzoai_agent/sdk/python
zeekayandHanzo Dev 116fc35319 The web3 extension imports, and says what is missing
eth-account was declared nowhere, so importing the shipped extension
failed on a clean install and its tests took the suite's collection with
them. It is a web3 extra now, which dev names once.

web3_agent and web3_network are no longer exported: they are written
against an agent model this package does not have — InferenceResult,
State, Router, RouterFn, a network module, and two sibling modules that
do not exist either. Importing them from the package __init__ made all
of it unimportable, including the two modules that are sound. Whether
this SDK grows a network model is a decision, not a rename.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-11 04:10:09 -07:00
..

Hanzo Agents Python SDK

The Hanzo Agents SDK provides a production-ready Python interface for registering agents, executing workflows, and integrating with the Hanzo Agents control plane.

Installation

pip install hanzo-agents

To work on the SDK locally:

git clone https://github.com/hanzoai/agents.git
cd hanzo-agents/sdk/python
python -m pip install -e .[dev]

Quick Start

from hanzo-agents import Agent

agent = Agent(
    node_id="example-agent",
    hanzo_agents_server="http://localhost:8080",
    dev_mode=True,
)

@agent.reasoner()
async def summarize(text: str) -> dict:
    result = await agent.ai(
        prompt=f"Summarize: {text}",
        response_model={"summary": "string", "tone": "string"},
    )
    return result

if __name__ == "__main__":
    agent.serve(port=8001)

See docs/DEVELOPMENT.md for instructions on wiring agents to the control plane.

Testing

pytest

To run coverage locally:

pytest --cov=hanzo-agents --cov-report=term-missing

License

Distributed under the Apache 2.0 License. See the project root LICENSE for details.