Complex workflows crash single-agent systems. Multi-Agent Orchestration distributes the cognitive load by dividing a task among specialized agents (e.g. Researcher, Coder, Reviewer). Prompting a multi-agent system means defining not just individual roles, but the communication protocol, state machine, and handoff contracts between them.
AGENT_PLAN:
CODER_SYSTEM_PROMPT: You are the Coder. Your only job is to write Python code based on the Architect's JSON spec. Input: { 'spec': {...}, 'prior_errors': [...] } Output: Write ONLY valid python code. No explanations.
TESTER_PROTOCOL: Input: {{coder_output}} Action: Execute script in sandbox. Output format: Exit Code: [0 or 1] Stdout: [console output] Stderr: [compiler/execution errors]
WRITER_PROMPT: You are the Writer. Write a 100-word post explaining prompt compilers. Format as plain Markdown.
EDITOR_PROMPT: You are the Editor. Review the Writer's draft against these criteria:
Output format: Status: [APPROVED or REJECTED] Feedback: [Constructive notes if rejected, else blank]
LOOP:
Claude's high reasoning makes it an excellent Architect or Reviewer. Use Sonnet/Opus for planning/review, and Haiku for fast, repetitive execution sub-agents.