Repository navigation
v0.1.7
Custom tools
Pass local Python functions to an agent via tools=; the SDK executes the agent's tool calls on your machine and posts results back automatically.
def get_weather(city: str) -> str:
"""Current weather for a city."""
...
result = run_session(client, agent="h/web-surfer-holo3-1-35b", messages="...", tools=[get_weather])Also new: Session.agent_view_url, a link to the session's Agent View (live view and replay), and a clickable live-view link in the hai CLI.
Note: the v0.1.6 build on PyPI does not contain these features; this release is the one that ships them.