Writing prompts for multi-agent teams is fundamentally different from prompting a single AI. You're not just telling one agent what to do — you're designing a coordination system where multiple agents must understand their roles, communicate effectively, and produce coherent combined output.
Every agent needs a crystal-clear identity. Vague roles like "Research Agent" lead to overlapping work. Specific roles like "B2B SaaS Market Sizing Analyst — responsible for TAM/SAM/SOM calculations using bottom-up methodology" create agents that know exactly where their lane starts and ends.
Weak role definition:
You are a research agent. Research the market.
Strong role definition:
You are a Competitive Intelligence Analyst. Your mission is to identify the top 5 direct competitors, analyze their pricing models, map their feature sets against ours, and produce a comparison matrix. You do NOT cover market sizing or customer segmentation — those are handled by other team members.
The explicit exclusions are as important as the inclusions. They prevent agents from stepping on each other's work.
In a Sequential Pipeline, each agent needs to know what it receives and what it must produce. Think of it like an API contract between agents.
Example handoff specification:
Phase 1 (Market Researcher) outputs: A JSON document containing market_size, growth_rate, key_trends (array of 5+), and primary_sources (array of URLs).
Phase 2 (Strategy Analyst) receives Phase 1's output and produces: A strategic assessment document with sections for Opportunities, Threats, Recommended Positioning, and Risk Factors.
Without explicit handoffs, agents make assumptions about what the previous agent covered, leading to gaps or redundancy.
Be hyper-specific about deliverables. Word counts, section names, file paths, and structure requirements eliminate ambiguity.
Vague output spec:
Write a report about the findings.
Precise output spec:
Produce a markdown report (1500-2000 words) saved to
outputs/market_analysis/report.mdwith these exact sections: Executive Summary (200 words), Market Landscape (400 words), Competitive Matrix (table format, minimum 5 competitors × 8 features), Strategic Recommendations (3-5 numbered items, 100 words each), and Sources (minimum 10 citations).
The best agent teams don't just work independently — they build on each other's insights. Specify how agents should reference and challenge each other.
Collaboration instructions:
After all analysts complete their individual sections, the Synthesis Agent must: (1) identify contradictions between analyst findings, (2) resolve conflicts by referencing primary data, (3) highlight areas of strong consensus, and (4) flag remaining uncertainties for human review.
If two agents could reasonably claim ownership of the same subtask, you'll get duplicate work. Draw explicit boundaries.
If Agent C needs output from Agent A but your prompt doesn't specify this, Agent C might start with assumptions instead of data. Make dependency chains explicit.
When multiple agents contribute to a single document, the voice can shift jarringly between sections. Add a final synthesis step that normalizes tone and ensures coherence.
There's a balance. If you constrain agents too tightly, you lose the creative problem-solving that makes AI valuable. Specify the what and the format, but leave room for the how.
After generating your team prompt, review it through each agent's eyes. Can Agent 2 do its job with only the information it receives? Does Agent 3 know exactly what "done" looks like? If any agent would need to ask a clarifying question, your prompt needs more detail.