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.1.tar.gz (181.2 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.1-py3-none-any.whl (204.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hanzo_agents-0.2.1.tar.gz
  • Upload date:
  • Size: 181.2 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.1.tar.gz
Algorithm Hash digest
SHA256 5bc15f2718c19eb9b59d70c32f7bed58e231d3fae4effe6a556778c9a3dfa5a1
MD5 532b4f47c983cea90f4a2cdd8f756943
BLAKE2b-256 bddb7b0e8ab2499d64bd60151244a26cf5a19710b06fc4b9b9a2dd03a6e06791

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hanzo_agents-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 40816c54702aaa4a74b351c49900cfcf4302f75c17c6391d75f7bd5acf449165
MD5 c1e3b10f3a3818cb58fa43b4bd508257
BLAKE2b-256 3f54c5c397a8df9e76013d2a630ba45bd82094f27ea124992cdc30393c1a8df7

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