# math_agent.py
import asyncio
from opper_agents import Agent, tool
@tool
def add(a: int, b: int) -> int:
"""Add two numbers together."""
return a + b
@tool
def multiply(a: int, b: int) -> int:
"""Multiply two numbers together."""
return a * b
agent = Agent(
name="MathAgent",
description="A helpful math assistant",
tools=[add, multiply],
verbose=True # See what the agent is thinking
)
async def main():
result = await agent.process("What is 5 + 3, then multiply by 2?")
print(f"Result: {result}")
asyncio.run(main())