from upsonic import Agent, Task
from upsonic.tools import tool
@tool
def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b
@tool
def multiply(a: int, b: int) -> int:
"""Multiply two numbers."""
return a * b
agent = Agent(model="anthropic/claude-sonnet-4-5")
task = Task(description="Calculate 5 + 3 and then multiply by 2", tools=[add])
task.add_tools(multiply)
result = agent.print_do(task)
print("Result:", result)