Skip to main content

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/agent.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.

Metadata

Release files for hanzo-agents 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hanzo-agents 0.2.10
File Size Uploaded
hanzo_agents-0.2.10.tar.gz 188.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hanzo-agents 0.2.10
File Interpreter ABI Platform
hanzo_agents-0.2.10-py3-none-any.whl Python 3 none any Details

Total release size: 401.0 kB

Release files / hanzo_agents-0.2.10.tar.gz

Download URL hanzo_agents-0.2.10.tar.gz
Size 188.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d83687702eca41cfeeb25c4ed611883d7bc36e3bf84480c77e5a4c791339e974
BLAKE2b-256 checksum
How to use checksums
5953df9c532b8cc42caf10d0464ab618239ae1c8a71b82447de961b4353789af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / hanzo_agents-0.2.10-py3-none-any.whl

Download URL hanzo_agents-0.2.10-py3-none-any.whl
Size 212.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5a1cb64bb1ac276a83f190563cd38263cd44b776b74970daf8d5c174933232e
BLAKE2b-256 checksum
How to use checksums
88833548e9b3a0797fce175ecd60619c8956898d3802c283161e7f83af7cf87b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.10 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page