mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-27 04:20:09 +00:00
New hanzo-tasks package wrapping temporalio SDK with Hanzo conventions: - Client: connect, submit, get_result, cancel, signal, query - Worker: register workflows/activities, poll and execute - Pre-built workflows: AgentTaskWorkflow, PipelineWorkflow, FanOutWorkflow - Pluggable agent executor via set_agent_executor() - 28 tests passing
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
"""
|
|
hanzo-tasks — Durable workflow execution for AI agents.
|
|
|
|
Wraps the Temporal Python SDK with Hanzo conventions for agent task
|
|
orchestration, including pre-built workflows for pipelines and fan-out.
|
|
|
|
Example:
|
|
>>> from hanzo_tasks import Client, TasksConfig
|
|
>>> client = await Client.connect(TasksConfig(namespace="hanzo"))
|
|
>>> handle = await client.submit(AgentTaskWorkflow.run, task_input, queue="agents")
|
|
>>> result = await handle.result()
|
|
"""
|
|
|
|
from .activities import execute_agent_task, send_notification, set_agent_executor
|
|
from .client import Client, TasksConfig, WorkflowHandle
|
|
from .worker import Worker
|
|
from .workflows import (
|
|
AgentTaskInput,
|
|
AgentTaskOutput,
|
|
AgentTaskWorkflow,
|
|
FanOutWorkflow,
|
|
PipelineWorkflow,
|
|
)
|
|
|
|
__version__ = "0.1.0"
|
|
__all__ = [
|
|
# Client
|
|
"Client",
|
|
"TasksConfig",
|
|
"WorkflowHandle",
|
|
# Worker
|
|
"Worker",
|
|
# Workflows
|
|
"AgentTaskWorkflow",
|
|
"PipelineWorkflow",
|
|
"FanOutWorkflow",
|
|
"AgentTaskInput",
|
|
"AgentTaskOutput",
|
|
# Activities
|
|
"execute_agent_task",
|
|
"send_notification",
|
|
"set_agent_executor",
|
|
]
|