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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hanzo_agents-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8fb5fef90cb8e6371ab309f2e36a7ce451990491935f91364d566a799874c20d
MD5 65a8bc8df62cc99a8513d261976b882b
BLAKE2b-256 d07f64464c57c4bfc95b6e73d0ed3f9768c8f56bc927805e526aa6b0e1daca07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hanzo_agents-0.2.0-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.12

File hashes

Hashes for hanzo_agents-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01b363ceeea6a4850fdb4c5754bc189518de474847a98c2ae1cb30425e2522e7
MD5 7c88f47695f7077b767afb0dad814343
BLAKE2b-256 cc569868df74233a87dc414b02b3e0b048c46013f9ab98b6af41410e6530e0c2

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