from upsonic import Agent, Task, Team
researcher = Agent(
model="anthropic/claude-sonnet-4-5",
name="Researcher",
role="Research Specialist",
goal="Find accurate information and data",
)
editor = Agent(
model="anthropic/claude-sonnet-4-5",
name="Editor",
role="Editor",
goal="Polish and refine content",
)
writer_team = Team(
entities=[
Agent(
model="anthropic/claude-sonnet-4-5",
name="Writer",
role="Content Writer",
goal="Create clear and engaging content",
),
editor,
],
mode="sequential",
name="WriterTeam",
)
team = Team(
entities=[researcher, writer_team],
mode="sequential",
)
tasks = [
Task(description="Research the latest developments in quantum computing"),
Task(description="Write a blog post about quantum computing for general audience"),
]
for chunk in team.stream(tasks):
print(chunk, end="", flush=True)