dsh-agent-teams

682Stars65Forks24Issues2Watchers

Adds multi-Agent team collaboration to DeepSeek Harness: the current session acts as team leader, using natural language to break down tasks, assign members, advance based on dependencies, and summarize results.

Language
TypeScript
License
MIT
Branch
main
agentteamsdeepseekharnessdshdsh-agent-teamsdsh-plugin

Install

$ dsh plugin --profile web add github:NanmiCoder/dsh-agent-teams

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

At a Glance

Turns the current DeepSeek Harness session into a team leader, delegating goals to multiple resumable sub-agents running in parallel. Tools, state, and web overlay are all built into the plugin—just install and go.

Core Capabilities

  • Transforms the current session into a team leader; natural language instructions can recruit team members
  • Recruits sub-agent members with role assignments, each member is a session that can be resumed across rounds
  • Splits goals into dependent tasks; tasks with unmet dependencies won't be claimed
  • Shared scheduler automatically assigns ready tasks to idle members, safely revokes old attempts when reassigning
  • Members and leader communicate directly through persistent mailboxes, messages wake up the recipient
  • Real-time activity panel in the web interface displays member status, task DAG, and mail

Technical Implementation

  • Language: TypeScript (with React client)
  • Key Dependencies: @deepseek-ai/cordis, @deepseek-ai/dsh-subagent, @deepseek-ai/dsh-tools, @deepseek-ai/dsh-system-prompt
  • Architecture Pattern: Host-side cordis plugin, injected via bundle patch; registers 10 agent_teams_* tools in ctx.tools, injects usage strategy section into ctx.systemPrompt; Web side presents as body portal overlay + in-session cards
  • Entry Files: src/index.ts (host side), src/client/index.tsx (browser side)

Use Cases

When a task that can be solved in a single DeepSeek Harness session isn't enough—like simultaneously reviewing code, checking security, investigating products, and doing research—use natural language to have the current session recruit a team, split by role to push forward, pass results to each other, and synthesize into a complete response.

Dependencies & Compatibility

DependencyMin VersionDescription
DeepSeek Harness0.1.0-rc.6Host framework; plugin injects as cordis bundle
Node^22.19.0 or >=24From package.json engines.node
Subagent runtime0.1.0-rc.6Provides resumable member capability; selected via cordis.patch.yml's memberProvider: spawn
PlatformCross-platformOnly Node version specified; no OS constraints

Installation

dsh plugin --profile web add github:NanmiCoder/dsh-agent-teams

Configuration

ConfigTypeDescriptionDefault
stateDirstringSubdirectory name for team state files under leader workspace (contains team.json and each agent's mailbox files).agent-teams
memberProviderstringSubagent runtime backend for creating members (e.g., spawn/fork), not LLM providerspawn
memberModelstringModel identifier used by all members; empty inherits leader's current modelNot set
memberMaxDepthnumberMax depth members can delegate further down; 0 disables delegation1
maxMembersnumber (≥1)Maximum team size allowed8
promptSectionOrdernumberSorting weight for usage strategy section in system prompt117

FAQ

Q: Any additional configuration needed after installation?

A: Works with default parameters. Restart DSH after installation; only modify in profile config when changing team size or member backend.

Q: Can one session lead multiple teams at once?

A: Only one. The system checks during agent_teams_create if the current session is already a leader—duplicate creation errors out directly, requiring the old team to end first.

Q: How do members communicate with each other?

A: Via persistent mailbox. Any member or leader can call agent_teams_send_message to deliver messages directly to someone's mailbox and,顺便wake them up for the next round—no need for leader relay.

Q: Is team data preserved after the team ends?

A: Yes. agent_teams_delete moves the entire team directory to the archive area, preserving members, tasks, dependency graph, and mailbox history. The web panel can still review historical snapshots.

Q: What happens to incomplete tasks after a crash or interrupt?

A: Scheduling is event-driven, not polling-based. When the leader returns or status tools are called, the scheduler finds idle members still holding incomplete tasks, revokes old attempts and generates new attempts to automatically wake original members to continue.

Q: Will multiple people editing the same team simultaneously cause conflicts?

A: Each team is serialized within a single DSH process, no cross-overwrites. However, officially noted: multiple processes modifying the same team simultaneously doesn't guarantee consistency—single process usage is recommended.

Q: Which LLM needs to be selected to use this?

A: No mandatory requirement. Members default to inheriting the leader's current provider and model, with a snapshot of reasoning intensity at that moment; only when explicitly specifying a role to use a different model is the optional model parameter needed.

Q: Can this plugin run standalone without installing DSH?

A: No. It's a host-side plugin, relying on cordis services, subagent registry, and system prompt injection points; without a host there are no registration targets.

Getting Started

Beginner — Install and use immediately with a single command, natural language instructions, zero interaction; only review configuration when fine-tuning team size or member backend.

Known Issues & Limitations

  • Scheduler is event-driven rather than polling; when leader is offline for extended periods, can't actively recover members—must wait for leader to return or for scheduler to trigger after calling status tools
  • A leader can only lead one active team at a time; excess creation is directly rejected by the tool
  • Members don't have their own independent tool whitelist—they still retain all regular tools like bash, filesystem, networking—only the role persona is replaced
  • Team state uses file persistence; serialization within the same process is handled, but no consistency guarantee for cross-process simultaneous modifications to the same team
  • Activity panel directly displays real state from disk; won't do task wrap-up on behalf of the model—if a member completes work but forgets to call the update tool, the leader needs to rely on status queries rather than the panel to summarize
  • Web overlay mounts via body portal; on ultra-wide screens the main conversation column smoothly gives way, narrow screens revert to overlay overlay mode, left navigation always stays in place