Skip to main content
The Teams Service enables you to create and manage multi-agent teams that can collaborate on complex tasks. Teams consist of multiple agents working together under a team leader’s coordination.

Quick Start

Features

Team Management

Create, update, and delete multi-agent teams

Agent Membership

Add and remove agents from teams

Team Execution

Execute tasks with team collaboration

Streaming Responses

Real-time streaming execution results

List Teams

Retrieve all teams in your organization with optional filtering:
Parameters:
  • skip (int, optional): Number of records to skip for pagination (default: 0)
  • limit (int, optional): Maximum number of teams to return (default: 100)
  • status_filter (str, optional): Filter by status: ‘active’, ‘inactive’, ‘archived’, or ‘idle’
Returns: List of team dictionaries with agent information

Get Team

Retrieve a specific team by ID:
Parameters:
  • team_id (str, required): Team UUID
Returns: Dictionary containing team details with associated agents

Create Team

Create a new team with configuration:
Parameters:
  • team_data (dict, required): Team configuration
    • name (str): Team name
    • description (str): Team description
    • runtime (str): Runtime type - ‘default’ or ‘claude_code’
    • configuration (dict, optional): Team configuration settings
    • skill_ids (list, optional): List of skill UUIDs
    • skill_configurations (dict, optional): Skill-specific configs
    • environment_ids (list, optional): List of environment UUIDs
    • execution_environment (dict, optional): Execution environment config
Returns: Dictionary containing created team details

Update Team

Update an existing team (partial update):
Parameters:
  • team_id (str, required): Team UUID
  • team_data (dict, required): Fields to update (partial update)
    • name (str, optional): Team name
    • description (str, optional): Team description
    • status (str, optional): Team status
    • runtime (str, optional): Runtime type
    • configuration (dict, optional): Team configuration
    • skill_ids (list, optional): List of skill IDs
    • skill_configurations (dict, optional): Skill configs
    • environment_ids (list, optional): Environment IDs
    • execution_environment (dict, optional): Execution environment config
Returns: Dictionary containing updated team details

Delete Team

Delete a team:
Parameters:
  • team_id (str, required): Team UUID
Returns: None (204 No Content on success)
Deleting a team is permanent and cannot be undone. Ensure you have backups of any important team configurations.

Agent Management

Add Agent to Team

Add an agent to a team by setting the agent’s team_id:
Parameters:
  • team_id (str, required): Team UUID
  • agent_id (str, required): Agent UUID to add
Returns: Dictionary containing updated team details with agents

Remove Agent from Team

Remove an agent from a team:
Parameters:
  • team_id (str, required): Team UUID
  • agent_id (str, required): Agent UUID to remove
Returns: Dictionary containing updated team details with agents

Team Execution

Execute Team Task

Execute a task using team collaboration:
Parameters:
  • team_id (str, required): Team UUID
  • execution_data (dict, required): Execution request
    • prompt (str, required): The task prompt
    • worker_queue_id (str, required): Worker queue UUID
    • system_prompt (str, optional): Optional system prompt
    • user_metadata (dict, optional): User attribution metadata
Returns: Dictionary containing execution details
The execution creates a record and starts a Temporal workflow. The actual execution happens asynchronously.

Execute with Streaming

Execute a team task with real-time streaming responses:
Parameters:
  • team_id (str, required): Team UUID
  • execution_data (dict, required): Execution request
    • prompt (str, required): The task prompt
    • stream (bool): Should be True for streaming
    • worker_queue_id (str, required): Worker queue UUID
    • system_prompt (str, optional): Optional system prompt
    • user_metadata (dict, optional): User attribution metadata
Returns: Iterator of response chunks (Server-Sent Events)
Use streaming for long-running tasks to get real-time progress updates as the team works on the task.

Complete Example

Here’s a complete example of creating and using a team:

Error Handling

Handle team-related errors:

Best Practices

Team Organization

  • Specialized Teams: Create teams for specific domains (e.g., infrastructure, security, data)
  • Right-Sized Teams: Keep teams focused with 3-7 agents for optimal coordination
  • Clear Naming: Use descriptive team names that indicate their purpose

Agent Assignment

  • Complementary Skills: Add agents with complementary skill sets
  • Load Distribution: Balance workload across team members
  • Skill Overlap: Include some skill overlap for redundancy

Execution

  • Use Streaming: For long-running tasks, use execute_stream() for real-time feedback
  • Worker Queues: Assign teams to appropriate worker queues for execution isolation
  • System Prompts: Provide clear coordination instructions in system prompts

Team Lifecycle

  • Regular Reviews: Periodically review team composition and effectiveness
  • Archive Inactive: Archive teams that are no longer needed instead of deleting
  • Version Control: Keep track of team configuration changes

API Reference

Next Steps

Agents Service

Manage individual agents

Projects Service

Organize teams in projects

Skills Service

Manage team skills

Workers Service

Configure worker queues