Hey, vibe coders! Today we're talking about how to stop fighting a single AI agent that tries to be a jack of all trades and start using a whole team of specialised helpers. The subject is Sub-agents and Agent Teams in Claude Code — tools that let you scale your work with AI by delegating tasks and managing parallel execution.
Why you need it
Picture this: you're working on a complex project where you need to research an API, write the code, test it and write the docs all at once. Trying to make one agent do all of that is a fast track to context overflow, loss of focus and, as a result, poor output. That's exactly where Sub-agents and Agent Teams come in.
Sub-agents are specialised helper agents, each with its own isolated context window and a narrow system prompt. One can be an "API researcher", another a "code reviewer", a third a "test engineer". The main orchestrator agent hands out tasks and collects results. That lets you:
- Isolate context: each sub-agent focuses on its own narrow task without cluttering its context with extra information. That cuts token cost, since the results are summarised back into the main context code.claude.com.
- Parallelise the work: instead of running tasks one after another, you can launch several sub-agents at once and speed things up considerably.
- Improve accuracy: narrow specialisation makes an agent more precise and effective in its area. Less improvisation, and it's easier to restrict the tools it can reach for.
Agent Teams are the next step in the evolution of multi-agent systems. This isn't just a set of sub-agents but a real team, where several sessions coordinate through a shared task board and message passing. There's no single orchestrator running everything. Instead, teammates exchange messages directly and self-coordinate via a shared task list code.claude.com. It's the ideal fit for complex work that needs discussion and collaboration code.claude.com.
How to use it
Claude Code now has an /agents command for creating custom sub-agents in Markdown with YAML front matter. And in 2024 came Agent Teams, where a "team lead" plans and delegates while specialists work in parallel in the background agentsroom.dev.
To create a sub-agent in Claude Code, you define its role and instructions. For a research agent, for example:
--- # agent.yaml
name: Researcher
description: An agent specialized in researching technical documentation and APIs.
prompt:
- role: system
content: |-
You are a highly skilled technical researcher. Your task is to find relevant information from provided documentation or web searches and summarize it concisely. Focus on key facts, examples, and API endpoints. Do not invent information.
---
You can then call that agent from the main prompt and hand it a task. Agent Teams are more involved, since they rely on self-coordination and message passing between agents. It's an experimental feature, off by default, but it's a solid entry point into multi-agent orchestration agentsroom.dev.
Tricks nobody writes about
- Don't over-specify: a narrow prompt matters, but don't try to script every step. Give the agent enough room to do its specialised job. Sometimes too many constraints stop it from showing what it can do.
- Use artifacts as the handoff: since sub-agents can't see each other's context, their interaction has to go through explicit artifacts. The "researcher" writes a
research_summary.md, which is then handed to the "coder". That prevents conflicts and keeps the information handoff clean. - Split file ownership: parallel edits to the same file are a road to conflicts. If several agents have to touch code, make sure they work on different modules or functions, or that one agent owns the final integration.
How it ties into the qvib.pro engine
qvib.pro engines ship ready-made rules, roles and skills that map neatly onto the Sub-agents and Agent Teams model. You can use our preconfigured roles to spin up specialised agents fast instead of assembling everything by hand. That gets you from idea to a working multi-agent setup quicker, with your attention on business logic rather than prompt configuration.
Full card in the arsenal: https://qvib.pro/arsenal/trends/dev-subagents/