Skip to main content

Python SDK for the Hanzo Agents control plane

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanzo_agents-0.2.3.tar.gz (181.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hanzo_agents-0.2.3-py3-none-any.whl (204.2 kB view details)

Uploaded Python 3

File details

Details for the file hanzo_agents-0.2.3.tar.gz.

File metadata

  • Download URL: hanzo_agents-0.2.3.tar.gz
  • Upload date:
  • Size: 181.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hanzo_agents-0.2.3.tar.gz
Algorithm Hash digest
SHA256 bad1cf1e984f0124b17450b4dc79745b1273821c5a365692602667ccdcd78d2c
MD5 14197a9b39a61c1d1ce5f0356b79fbf0
BLAKE2b-256 7dcaf295eb2b16fa236eacd61d3a0adee8f43aea409a4e71a05c6ccbca496451

See more details on using hashes here.

File details

Details for the file hanzo_agents-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: hanzo_agents-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 204.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hanzo_agents-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 39efa3e5c1ccc03e9947c5d12e9875daf85759b26c1c01d6eddbd590c52afeca
MD5 ac7b5e3600c1fd2f24160c772e066389
BLAKE2b-256 b3d3e27f6f12f51dcb0d7230279396481f9ed6f12d9c80f9b11c6eec991677b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page