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.Documentation Index
Fetch the complete documentation index at: https://docs.kubiya.ai/llms.txt
Use this file to discover all available pages before exploring further.
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: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’
Get Team
Retrieve a specific team by ID:team_id(str, required): Team UUID
Create Team
Create a new team with configuration:team_data(dict, required): Team configurationname(str): Team namedescription(str): Team descriptionruntime(str): Runtime type - ‘default’ or ‘claude_code’configuration(dict, optional): Team configuration settingsskill_ids(list, optional): List of skill UUIDsskill_configurations(dict, optional): Skill-specific configsenvironment_ids(list, optional): List of environment UUIDsexecution_environment(dict, optional): Execution environment config
Update Team
Update an existing team (partial update):team_id(str, required): Team UUIDteam_data(dict, required): Fields to update (partial update)name(str, optional): Team namedescription(str, optional): Team descriptionstatus(str, optional): Team statusruntime(str, optional): Runtime typeconfiguration(dict, optional): Team configurationskill_ids(list, optional): List of skill IDsskill_configurations(dict, optional): Skill configsenvironment_ids(list, optional): Environment IDsexecution_environment(dict, optional): Execution environment config
Delete Team
Delete a team:team_id(str, required): Team UUID
Agent Management
Add Agent to Team
Add an agent to a team by setting the agent’s team_id:team_id(str, required): Team UUIDagent_id(str, required): Agent UUID to add
Remove Agent from Team
Remove an agent from a team:team_id(str, required): Team UUIDagent_id(str, required): Agent UUID to remove
Team Execution
Execute Team Task
Execute a task using team collaboration:team_id(str, required): Team UUIDexecution_data(dict, required): Execution requestprompt(str, required): The task promptworker_queue_id(str, required): Worker queue UUIDsystem_prompt(str, optional): Optional system promptuser_metadata(dict, optional): User attribution metadata
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:team_id(str, required): Team UUIDexecution_data(dict, required): Execution requestprompt(str, required): The task promptstream(bool): Should be True for streamingworker_queue_id(str, required): Worker queue UUIDsystem_prompt(str, optional): Optional system promptuser_metadata(dict, optional): User attribution metadata
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
| Method | Endpoint Pattern | Description |
|---|---|---|
list() | GET /teams | List all teams |
get() | GET /teams/ | Get team by ID |
create() | POST /teams | Create new team |
update() | PATCH /teams/ | Update team |
delete() | DELETE /teams/ | Delete team |
add_agent() | POST /teams//agents/ | Add agent to team |
remove_agent() | DELETE /teams//agents/ | Remove agent |
execute() | POST /teams//execute | Execute task |
execute_stream() | POST /teams//execute/stream | Execute with streaming |
Next Steps
Agents Service
Manage individual agents
Projects Service
Organize teams in projects
Skills Service
Manage team skills
Workers Service
Configure worker queues