Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/developers/tools/_meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export default {
shell: 'Shell',
'todo-write': 'Todo Write',
task: 'Task',
swarm: 'Swarm',
'exit-plan-mode': 'Exit Plan Mode',
'web-fetch': 'Web Fetch',
'web-search': 'Web Search',
Expand Down
1 change: 0 additions & 1 deletion docs/developers/tools/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Qwen Code's built-in tools can be broadly categorized as follows:
- **[Memory Tool](./memory.md) (`save_memory`):** For saving and recalling information across sessions.
- **[Todo Write Tool](./todo-write.md) (`todo_write`):** For creating and managing structured task lists during coding sessions.
- **[Task Tool](./task.md) (`task`):** For delegating complex tasks to specialized subagents.
- **[Swarm Tool](./swarm.md) (`swarm`):** For running many independent lightweight workers in parallel and aggregating their results.
- **[Exit Plan Mode Tool](./exit-plan-mode.md) (`exit_plan_mode`):** For exiting plan mode and proceeding with implementation.

Additionally, these tools incorporate:
Expand Down
102 changes: 0 additions & 102 deletions docs/developers/tools/swarm.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/users/features/arena.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ Agent Arena is experimental. Current limitations:

## Comparison with other multi-agent modes

Agent Arena is one of several multi-agent modes in Qwen Code. **Agent Team** is not yet implemented. **Agent Swarm** is available as a lightweight tool for batch-style parallel worker execution.
Agent Arena is one of several planned multi-agent modes in Qwen Code. **Agent Team** and **Agent Swarm** are not yet implemented — the table below describes their intended design for reference.

| | **Agent Arena** | **Agent Team** (planned) | **Agent Swarm** |
| | **Agent Arena** | **Agent Team** (planned) | **Agent Swarm** (planned) |
| :---------------- | :----------------------------------------------------- | :------------------------------------------------- | :------------------------------------------------------- |
| **Goal** | Competitive: Find the best solution to the _same_ task | Collaborative: Tackle _different_ aspects together | Batch parallel: Dynamically spawn workers for bulk tasks |
| **Agents** | Pre-configured models compete independently | Teammates collaborate with assigned roles | Workers spawned on-the-fly, destroyed on completion |
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/agents/runtime/agent-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ import { type ContextState, templateString } from './agent-headless.js';
*/
export const EXCLUDED_TOOLS_FOR_SUBAGENTS: ReadonlySet<string> = new Set([
ToolNames.AGENT,
ToolNames.SWARM,
ToolNames.CRON_CREATE,
ToolNames.CRON_LIST,
ToolNames.CRON_DELETE,
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2566,10 +2566,6 @@ export class Config {
const { AgentTool } = await import('../tools/agent/agent.js');
return new AgentTool(this);
});
await registerLazy(ToolNames.SWARM, async () => {
const { SwarmTool } = await import('../tools/swarm.js');
return new SwarmTool(this);
});
await registerLazy(ToolNames.SKILL, async () => {
const { SkillTool } = await import('../tools/skill.js');
return new SkillTool(this);
Expand Down
56 changes: 0 additions & 56 deletions packages/core/src/core/coreToolScheduler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import type { HookExecutionResponse } from '../confirmation-bus/types.js';
import { type NotificationType } from '../hooks/types.js';
import type { MessageBus } from '../confirmation-bus/message-bus.js';
import { IdeClient } from '../ide/ide-client.js';
import { ToolNames } from '../tools/tool-names.js';

vi.mock('fs/promises', () => ({
writeFile: vi.fn(),
Expand Down Expand Up @@ -3168,61 +3167,6 @@ describe('Fire hook functions integration', () => {
expect(startIndices.every((i) => i < firstEnd)).toBe(true);
});

it('should execute multiple swarm tools sequentially', async () => {
const executionLog: string[] = [];

const swarmTool = new MockTool({
name: ToolNames.SWARM,
execute: async (params) => {
const id = (params as { id: string }).id;
executionLog.push(`swarm:start:${id}`);
await new Promise((r) => setTimeout(r, 50));
executionLog.push(`swarm:end:${id}`);
return {
llmContent: `Swarm ${id} done`,
returnDisplay: `Swarm ${id} done`,
};
},
});

const tools = new Map([[ToolNames.SWARM, swarmTool]]);
const onAllToolCallsComplete = vi.fn();
const onToolCallsUpdate = vi.fn();
const scheduler = createScheduler(
tools,
onAllToolCallsComplete,
onToolCallsUpdate,
);

await scheduler.schedule(
[
{
callId: '1',
name: ToolNames.SWARM,
args: { id: 'A' },
isClientInitiated: false,
prompt_id: 'p1',
},
{
callId: '2',
name: ToolNames.SWARM,
args: { id: 'B' },
isClientInitiated: false,
prompt_id: 'p1',
},
],
new AbortController().signal,
);

expect(onAllToolCallsComplete).toHaveBeenCalled();
expect(executionLog).toEqual([
'swarm:start:A',
'swarm:end:A',
'swarm:start:B',
'swarm:end:B',
]);
});

it('should run concurrency-safe tools in parallel and unsafe tools sequentially', async () => {
const executionLog: string[] = [];

Expand Down
1 change: 0 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export type {
} from './tools/shell.js';
export type { SkillTool, SkillParams } from './tools/skill.js';
export type { AgentTool, AgentParams } from './tools/agent/agent.js';
export type { SwarmTool, SwarmParams, SwarmTask } from './tools/swarm.js';
export type {
TodoWriteTool,
TodoItem,
Expand Down
Loading
Loading