subagents

Delegate subtasks to specialized agents and collect results with wait_for_subagents.

5.0k|548|Updated May 14, 2025
One-click install
npx skills add https://github.com/dtyq/magic --skill subagents-dtyq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagents
Source: https://github.com/dtyq/magic/tree/main/backend/super-magic/agents/skills/subagents
Command: npx skills add https://github.com/dtyq/magic --skill subagents-dtyq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables orchestration by delegating sizable or multiple subtasks to specialized agents, keeping the main thread unburdened and avoiding cluttered conversations.

Core Features & Use Cases

  • Subtask delegation: Dispatch independent tasks to agents via call_subagent and aggregate results with wait_for_subagents.
  • Agent specialization: Use dedicated agent types (explore, shell, etc.) for different subtasks, improving efficiency and safety.
  • Flow control: Enforce depth limits so sub-agents cannot recursively dispatch further subagents, preventing runaway processes.

Quick Start

Dispatch a large task to a subagent and use wait_for_subagents to collect the results.

Frequently Asked Questions about subagents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delegate AI agent tasks for parallel execution?

You can delegate AI agent tasks for parallel execution by dispatching independent subtasks to specialized agents via call_subagent, then aggregating the outcomes with wait_for_subagents to collect results efficiently.

When should I use parallel task dispatch instead of a single agent?

Parallel task dispatch is applicable when your workload is decomposable into independent parts requiring different agent capabilities, keeping the main thread unburdened and avoiding cluttered conversations.

How to prevent runaway processes during AI agent orchestration?

To prevent runaway processes during AI agent orchestration, enforce depth limits so sub-agents cannot recursively dispatch further subagents, maintaining strict flow control over the delegated tasks.

Can I use specialized agent types for different subtasks?

Yes, you can use dedicated agent types such as explore or shell for different subtasks during orchestration, which improves both execution efficiency and safety for the specific delegated operation.

What is the best way to orchestrate multiple independent subtasks?

The best way to orchestrate multiple independent subtasks is to dispatch them to specialized agents using call_subagent and aggregate the final outcomes with wait_for_subagents for efficient collection.