from opperai.agent import Agent
geographer = Agent(
name="geographer",
instructions="You are a geography expert. Be precise and concise.",
)
coordinator = Agent(
name="coordinator",
instructions=(
"You are a helpful assistant. For geography questions, "
"use the geography_expert tool. Otherwise answer directly."
),
tools=[
geographer.as_tool(
name="geography_expert",
description="Ask a geography expert. Pass the full question as input.",
),
],
)
result = await coordinator.run("What are the three largest countries by area?")