<aside> 🦥
Choosing the Right Multi-Agent Architecture – LangChain
Effective context engineering for AI agents – Anthropic
Subagents in the SDK – Claude Code Docs
</aside>
<aside> 🦥
A subagent is a separate agent your main agent can spin up to handle one focused task. It has its own context window, own tools, and own instructions, does its job, then hands back only a short summary. Think of the main agent delegating to a specialist on the team.
</aside>
<aside> 🦥
Every long agent session eventually fills its context window with noise and starts getting dumber. Subagents fix this:
All the messy intermediate work stays in the subagent and never pollutes the main conversation. This is called context compression.
</aside>
<aside> 🦥
Separate control from execution:
Mental model: less "super-agent," more "tech lead who refuses to write code."
</aside>
<aside> 🦥
Rule of thumb: stateless + simple = tool; owns a whole chunk of work = subagent.
</aside>
<aside> 🦥
Start simple though: one agent first, build the workflow, THEN add subagents. Don't over-engineer. 🦥
</aside>