Agents, subagents and teams in DeepSeek Harness
Agents, subagents, and teams are three layers, not three synonyms. The main agent decides, subagents split work, and teams coordinate; mixing them usually produces excessive concurrency and tasks waiting on each other.
Three layers
Identify responsibilities before configuring.
| Layer | Role | Typical use | Context |
|---|---|---|---|
| Agent | Main executor | Understand, call tools, return results | Shared with session |
| Subagent | Delegated unit | Parallel retrieval, review, isolated subtasks | Relatively isolated |
| Team | Multi-role coordination | Review, staged implementation | Assigned by role |
The main agent is the decision center, the subagent is the execution unit, and the team is the organization. The main agent decides whether to delegate, how many, and when to collect results (source). A subagent takes a clear subtask, runs in its own context, and returns results; isolation enables parallelism and adds merge cost. A team defines roles, tasks, and sequencing for work with dependencies (source).
Subagents: split and isolate
The value is parallelism and isolation, not smarter output.
- Split into independent subtasks: retrieval, review, generation, verification.
- Write input, output, and completion criteria for each.
- Let the main agent dispatch and collect results.
- Check whether a subagent overstepped: edited the wrong files or called the wrong tools.
- Resolve conflicts in the main agent, not between subagents.
Isolation cuts both ways, and strong dependencies do not suit subagents. A subagent does not see the whole session, reducing interference but possibly missing constraints; the task brief must carry its own premises. If step two needs step one, serial is faster; parallel only adds waiting and merge work.
Teams: roles, concurrency, coordination
Teams solve "how multiple roles work together," centered on division and order.
- Define roles: planning, implementation, review.
- Define tasks and dependencies: what can parallelize and what must wait.
- Set a concurrency cap based on quota and machine capacity.
- Define handoff artifacts so the next role can continue.
- Define termination: when to stop, roll back, or hand to a human.
The cost of a team is coordination, and concurrency is not free. More roles mean more handoffs and waiting; two or three roles usually suffice. High concurrency queues, times out, and deadlocks; get serial working first.
Agent presets: fix the configuration
Presets solve "configuration differs every run."
- Choose a stable working configuration as the baseline.
- Fix model and key parameters.
- Document when the preset applies and when it does not.
- Give it a recognizable name and reference it from teams and subagents.
- Record versions when changing it.
A preset is "how to configure," a team is "how to collaborate," and presets should not change often. Changing one alters behavior for every task referencing it; create a new preset for experiments instead of editing the baseline.
Comparison
Choose by task shape, not habit.
| Task shape | Choose | Reason |
|---|---|---|
| Single-step Q&A, simple tools | Main agent | No split needed |
| Independent parallel subtasks | Subagents | Isolation and parallelism |
| Roles with dependencies | Team | Division and order |
| Repeated fixed flow | Preset plus team | Consistency and reuse |
If the main agent can solve it, do not split; teams are heavier, not "more advanced." Splitting adds context isolation, merging, and coordination costs. Use a team only when division and dependencies truly exist.
Configuration entry points
The three layers are configured in different places.
- Main agent: session-level model, tools, and prompts.
- Subagents: dispatched by the main agent with task scope and tools.
- Team: a team plugin or configuration defining roles, tasks, and concurrency.
- Preset: the agent preset management entry.
- Concurrency: set in the team or runtime configuration, not hard-coded per task.
Draw the relationships before changing configuration, and record the effective version. Otherwise one place changes while another keeps the old value, and multiple versions make diagnosis ambiguous.
Common failures
Four failures dominate multi-agent work.
- Too much concurrency: queueing, timeouts, exhausted quota; reduce first.
- Mutual waiting: circular dependencies; draw the graph and break the cycle.
- Subagent lacks context: missing premises; put constraints in the dispatch brief.
- Lost results: no handoff artifact; standardize output shape.
All four are coordination design issues, not model capability. Fix the structure before changing models.
Selection advice
Start light and upgrade by need.
- Try the main agent first.
- Add subagents when independent parallel work exists.
- Add a team when roles and dependencies exist.
- Extract a preset when a task repeats.
- Keep a rollback path at each step.
The upgrade criterion is "benefit exceeds coordination cost"; do not use multi-agent for its own sake. Parallel time saved must exceed splitting and merging cost. Tools serve goals; keep simple work simple.
Next steps
Identify the layer, then choose by task shape. For team orchestration, read How to use multi-agent teams. For presets, read What dsh agent presets are. To separate workflow, schedule, and subagents, read Workflow vs schedule vs subagent.
Sources: DeepSeek Harness docs, dsh-agent-teams plugin page, dsh CLI README
FAQ
Agents, subagents, and teams are different layers in DeepSeek Harness. An agent is the main executor, a subagent is a delegated unit, and a team is a multi-role organization.
In DeepSeek Harness, subagents suit independent subtasks that can run in parallel, such as retrieval and review, while teams suit role-based work with dependencies. Simple tasks use the main agent.
Slow or stuck multi-agent runs usually mean concurrency limits or model quota, or tasks waiting on each other. Excessive concurrency queues and times out, while circular designs deadlock.
A DeepSeek Harness agent preset fixes model, prompt, and tool settings for reuse, while a team defines roles, tasks, and coordination. Presets solve configuration, teams solve collaboration.
Related Terms
- agent
- An agent is the main executor in a session that understands the task, calls tools, and returns results, usually the decision center of a turn.— DeepSeek Harness docs
- subagent
- A subagent is an execution unit spawned by the main agent with a relatively isolated context and task scope, used for parallel or isolated subtasks.— DeepSeek Harness docs
- team
- A team is a multi-agent organization that defines roles, task assignment, and sequencing, suited to complex work with dependencies.— dsh-agent-teams plugin page
- agent preset
- An agent preset is a template that fixes model, prompt, and tool configuration for consistent agent behavior across runs.— DeepSeek Harness docs
Sources
- DeepSeek Harness docs· deepseek-harness
- dsh-agent-teams plugin page· dsh-plugin.org
- dsh CLI README· deepseek-ai