When one agent's prompt becomes too crowded, split responsibilities. Specialist agents (Researcher, Coder, Critic) communicate via shared state, message passing, or a supervisor — enabling deeper reasoning and parallel work at the cost of orchestration complexity.
Graph-based workflow with conditional edges and revision loops.
Start with supervisor pattern (one orchestrator, N specialists). Move to graph (LangGraph) only when flow becomes truly nonlinear.
Shared state is simpler for small graphs. Message passing scales better and isolates failures across agents.
Each handoff replays context. Multi-agent setups can be 5-10x more expensive than monolithic — watch the budget.
A critic agent that reviews specialist output catches 30-50% of errors before they reach the user.
Revision loops can spin forever. Set max_revisions per node and a global step cap.
Independent subtasks should run in parallel. Use async/asyncio.gather to slash wall-clock latency.
Sign in to share your feedback and join the discussion.