Skip to Content

Team

Teams coordinate multiple agents working together using different execution strategies.

Specification

apiVersion: ark.mckinsey.com/v1alpha1 kind: Team metadata: name: example-team spec: # Team members - agents or nested teams members: - name: researcher type: agent - name: analyst type: agent - name: writer type: agent # Execution strategy - how members collaborate strategy: selector # Options: sequential, selector, graph # Enable looping for sequential strategy (optional) # loops: true # maxTurns: 10 # Required when loops is true # Selector configuration - for strategy: selector selector: agent: planner # Agent to use for selection (required) selectorPrompt: "Choose the best agent for: {{.Input}}" # Optional # Graph constraints (optional) - can be combined with selector strategy # When combined with selector, limits AI selection to valid graph transitions graph: edges: - from: researcher to: analyst - from: analyst to: writer # # Sequential configuration - for strategy: sequential # strategy: sequential # # Single pass through members, no maxTurns needed # # Sequential with loops - for cycling through members # strategy: sequential # loops: true # maxTurns: 10 # Required - prevents infinite loops # # Graph-only configuration - for strategy: graph # strategy: graph # maxTurns: 10 # graph: # edges: # - from: researcher # to: analyst # - from: analyst # to: writer

Execution Strategies

Execution strategies define how team members are chosen during query execution.

  • sequential - Agents process input one after another in a single pass
  • sequential + loops - Agents cycle through members repeatedly until maxTurns or terminate
  • selector - Dynamic agent selection based on criteria, LLM chooses the next agent for the job
  • graph - Custom execution flows with edges, supports more complex workflows
  • selector + graph - Combines AI-driven selection with workflow constraints (selector agent chooses from graph-defined valid transitions)

strategy: round-robin is deprecated and will be removed in v1.0.0. Use strategy: sequential with loops: true instead. Existing round-robin teams are automatically migrated on create/update.

Turn Limiting

The maxTurns field limits execution turns. Its usage depends on the strategy:

  • sequential - Not applicable for single pass. Required when loops: true to prevent infinite loops.
  • selector - Limits selection rounds (each round = one agent selection and execution)
  • graph - Limits edge traversals through the execution graph

When maxTurns is reached:

  1. Team execution stops gracefully
  2. All responses generated up to the limit are returned
  3. Warning event emitted: TeamMaxTurnsReached
  4. Query completes successfully (not an error)
Last updated on