Skip to main content

Overview

Team enables multiple specialized agents to work together on complex tasks. Teams automatically coordinate work, share context, and combine results through different operational modes.

Key Features

  • Multiple Operation Modes: Sequential, coordinate, or route execution
  • Smart Assignment: Automatically picks the right agent for each task
  • Context Sharing: Agents receive context from previous tasks
  • Result Combining: Combines outputs into coherent final answer
  • Flexible Coordination: Leader-based planning or expert routing
  • Shared Memory: Optional memory sharing across team

Example

from upsonic import Agent, Task, Team

# Create specialized agents
researcher = Agent(
    "openai/gpt-4o",
    name="Researcher",
    role="Research specialist"
)

writer = Agent(
    "openai/gpt-4o",
    name="Writer",
    role="Content writer"
)

# Create team
team = Team(
    agents=[researcher, writer],
    mode="sequential"
)

# Create tasks
tasks = [
    Task("Research latest AI trends"),
    Task("Write a blog post about the research")
]

# Execute team
result = team.do(tasks)
print(result)