from upsonic import Agent, Task
# Create a specialized agent
research_agent = Agent(
name="Research Specialist",
model="openai/gpt-4o",
system_prompt="You are a research specialist focused on gathering information."
)
# Use the specialized agent as a tool
task = Task(
description="Research current AI trends and provide a summary",
tools=[research_agent]
)
# Main agent delegates to specialized agent
main_agent = Agent(
name="Main Coordinator",
model="openai/gpt-4o"
)
result = main_agent.do(task)
print(result)