from traceloop.sdk import Traceloop
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team import Team
Traceloop.init(app_name="agno_team")
researcher = Agent(
name="Researcher",
role="Research Specialist",
model=OpenAIChat(id="gpt-4o-mini"),
instructions=["Research topics thoroughly and provide factual information"],
debug_mode=True,
)
writer = Agent(
name="Writer",
role="Content Writer",
model=OpenAIChat(id="gpt-4o-mini"),
instructions=["Write clear, engaging content based on research"],
debug_mode=True,
)
team = Team(
name="ContentTeam",
members=[researcher, writer],
model=OpenAIChat(id="gpt-4o-mini"),
debug_mode=True,
)
# Team execution creates parent span with child spans for each agent
result = team.run("Write a brief overview of OpenTelemetry observability")
print(result.content)