Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cline.bot/llms.txt

Use this file to discover all available pages before exploring further.

Multi-agent teams let you break complex work across multiple agents that coordinate through a shared task board. One agent acts as the coordinator, delegating subtasks to specialist agents and merging their results.

Enabling Teams

Teams are a ClineCore feature. Enable them in the session config:
import { ClineCore } from "@cline/sdk"

const cline = await ClineCore.create({ clientName: "team-app" })

const session = await cline.start({
  prompt: "Plan and implement a user authentication module with tests",
  config: {
    providerId: "anthropic",
    modelId: "claude-sonnet-4-6",
    apiKey: process.env.ANTHROPIC_API_KEY,
    systemPrompt: "You are a coordinator for a multi-agent coding team.",
    cwd: "/path/to/project",
    workspaceRoot: "/path/to/project",
    enableTools: true,
    enableSpawnAgent: true,
    enableAgentTeams: true,
    teamName: "auth-sprint",
  },
})

How Teams Work

When teams are enabled, the coordinator agent gets additional tools:
ToolDescription
team_spawn_teammateCreate a new agent with a specific role and task
team_delegate_taskAssign a task to an existing teammate
team_check_statusCheck the status of delegated tasks
team_get_resultRetrieve the result of a completed task
The coordinator decides how to split work, which agents to create, and how to combine results.

Team Persistence

Team state persists across sessions:
~/.cline/data/teams/[team-name]/
  task-board.json      # Current tasks and their status
  mailbox.json         # Inter-agent messages
  mission-log.json     # Team activity history
Resume a team’s work in a new session:
cline --team-name auth-sprint "Continue -- pick up incomplete tasks"

Via CLI

# Start a new team
cline --team-name auth-sprint "Plan and implement user auth with tests"

# Resume work
cline --team-name auth-sprint "What's the status? Continue with unfinished tasks."

# Different team for a different workstream
cline --team-name perf-sprint "Profile the API endpoints and optimize the slowest 3"

Sub-Agents vs Teams

The SDK offers two levels of multi-agent coordination:
FeatureSub-AgentsTeams
Enable withenableSpawnAgent: trueenableAgentTeams: true
PersistenceWithin session onlyAcross sessions
CoordinationParent-childPeer-to-peer with task board
Shared stateNoneTask board, mailbox, mission log
Best forOne-off delegationComplex, multi-session projects
Sub-agents are lighter weight. The parent agent spawns a child, waits for its result, and continues. No persistent state, no task board.
// Sub-agents: simple delegation within a single session
const session = await cline.start({
  config: {
    enableSpawnAgent: true,  // Agent can spawn sub-agents
    // ...
  },
  // ...
})
Teams are for bigger efforts where work spans multiple sessions and agents need to coordinate asynchronously.

When to Use Teams

Teams add overhead. Use them when:
  • The task naturally decomposes into independent subtasks
  • Different subtasks benefit from different system prompts or specializations
  • Work spans multiple sessions or days
  • You want a persistent record of task delegation and completion
For simpler cases, a single agent with good tools is usually more efficient than a team.