📖 Step 9: AI/LLM#254 / 291

Subagent

Subagent

📖One-line summary

A helper agent the main agent spawns to handle a specific subtask.

💡Easy explanation

A helper AI the main agent spawns for a specific subtask. Like a manager handing off rote work to an intern.

Example

🤖Main agent
🧪Test-writing subagent
📚Research subagent
🔧Refactor subagent

Vibe coding prompt examples

>_

Define a 'write tests' subagent invoked by the main coding agent. Specify input/output schemas and exit conditions.

>_

Explain how to isolate a subagent so it doesn't pollute the main context — what info goes in vs. comes out.

>_

Recommend 5 subagents I should add to my agent system, each with a clear trigger condition.

Try these prompts in your AI coding assistant!