mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-27 04:20:09 +00:00
Converts hanzo-agent from git submodule to regular directory. This enables simpler cross-package refactoring and unified CI/CD. Source: github.com/hanzoai/agent.git (a8d7ec9)
12 lines
416 B
Python
12 lines
416 B
Python
from agents import Agent, Runner
|
|
|
|
agent = Agent(name="Assistant", instructions="You are a helpful assistant")
|
|
|
|
# Intended for Jupyter notebooks where there's an existing event loop
|
|
result = await Runner.run(agent, "Write a haiku about recursion in programming.") # type: ignore[top-level-await] # noqa: F704
|
|
print(result.final_output)
|
|
|
|
# Code within code loops,
|
|
# Infinite mirrors reflect—
|
|
# Logic folds on self.
|