Teams: detailed guide
This page focuses on the team-specific parts of the SDK: creation, configuration, agent management, and execution patterns. If you haven’t set up aControlPlaneClient yet, see the Client Quick Start at Client Overview for initialization and authentication instructions.
Create a team example
The following example demonstrates creating a team with multiple agents using the Control Plane SDK:Core Operations
List Teams
Retrieve a list of teams with optional filtering and pagination:| Parameter | Type | Default | Description |
|---|---|---|---|
skip | int | 0 | Number of records to skip for pagination |
limit | int | 100 | Maximum number of records to return |
status_filter | str | None | Filter by status: active, inactive, archived, idle |
Get Team Details
Fetch a single team’s details by UUID:Create Team
Create a new team:Update Team
Update an existing team’s configuration (partial update - only provided fields are updated):name- Team namevisibility- Team visibilitystatus- Team statusruntime- Runtime type (defaultorclaude_code)model_id- LLM model IDconfiguration- Team configurationskill_ids- List of skill IDsskill_configurations- Dict of skill configsenvironment_ids- List of environment IDsexecution_environment- Execution environment config
Delete Team
Permanently remove a team by UUID:Agent Management
Add Agent to Team
Add an agent to an existing team:team_id foreign key. You can also manage members through the team’s configuration.member_ids field.
Remove Agent from Team
Remove an agent from a team:Team Execution
Execute Task
Execute a task using the team. The team leader coordinates and delegates to appropriate team members:Execute with Streaming
Execute a task with real-time streaming response:| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | str | Yes | The task/prompt to execute |
system_prompt | str | No | Optional system prompt for team coordination |
stream | bool | No | Whether to stream the response |
worker_queue_id | str | Yes | Worker queue ID (UUID) to route execution to |
user_metadata | dict | No | User attribution metadata |
Error Handling
The Teams Service raisesTeamError for API errors:
Best Practices
- Use descriptive team names that reflect the team’s purpose
- Configure a capable leader agent to coordinate tasks effectively
- Group agents with complementary skills into the same team
- Use status filters when listing teams in large organizations
- Handle streaming responses gracefully with proper error handling
- Always specify
worker_queue_idfor execution to ensure proper routing