Architecture Patterns
1. Orchestrator-Worker
Best for: Clear task decomposition, parallel subtasks
Orchestrator (GPT-4o)
├── Researcher Agent (Perplexity/Tavily)
├── Writer Agent (Claude)
└── Editor Agent (GPT-4o-mini)
2. Peer-to-Peer (Debate)
Best for: High-stakes decisions requiring multiple perspectives Agents critique each other's outputs until consensus.
3. Hierarchical
Best for: Enterprise workflows with approvals CEO Agent → Manager Agents → Worker Agents
Communication Protocol
Use structured JSON handoffs between agents:
{
"task_id": "uuid",
"agent_from": "researcher",
"agent_to": "writer",
"context": {...},
"output": {...},
"confidence": 0.92
}
Failure Recovery
Always implement: retry with backoff, fallback agents, timeout circuits.