Agent swarms custam 10x mais (e não melhoram qualidade)
OpenAI Codex dev: Agent swarms = waste de tokens. 1.393 agents gastaram $20K em task que 1 agent fazia por R$ 500.
Equipe OpenClaw · Time de Engenharia & Produto
A Equipe OpenClaw é formada por engenheiros, designers e especialistas em IA dedicados a construir a melhor plataforma de agentes conversacionais para negócios brasileiros. Combinamos expertise…
Agent swarms custam 10x mais (e não melhoram qualidade)
Você é founder de SaaS.
Você pensa assim:
- "1 agente pode fazer essa tarefa"
- "Mas 3 agentes poderiam fazer MELHOR (dividir trabalho)"
- "5 agentes = qualidade garantida (redundância + diversidade)"
- "10 agentes = produção em escala (mais agentes = mais output)"
- Your assumption: "Mais agentes = melhor resultado."
- Reality: "Mais agentes = token waste + comunicação custosa + ZERO qualidade gain."
- Evidence: OpenAI Codex developer Eric Provencher publicou: ├─ Caso: 1.393 agents trabalhando em paralelo ├─ Task: Python refactoring (simples) ├─ Token cost: $20.000 (muito) ├─ Result: Mesma qualidade que 1 agent sozinho ├─ Cost 1 agent: ~$500 (10x menos) ├─ Lesson: "Coordination tax" destroi economics └─ Conclusion: "Multi-agent é armadilha custosa."
- Your realization: "Meu SaaS com 5 agentes está gastando 10x mais do que deveria?"
Seu problema AGORA:
Você tem arquitetura de múltiplos agentes:
- Agent 1: Classifica intenção do cliente
- Agent 2: Busca informações no banco
- Agent 3: Formata resposta
- Agent 4: Valida qualidade
- Agent 5: Escala se necessário
- Your assumption: "Separar responsabilidades = melhor qualidade."
- Reality: "Agents não confiam um no outro → redundância → waste."
- Example: ├─ Agent 1 classifica: "Cliente quer refund" ├─ Agent 2 valida: "Wait, let me double-check if refund is possible" ├─ Agent 3 verifica: "Let me also check policy" ├─ Agent 4 confirma: "Yes, confirmed, refund is possible" ├─ Result: Mesma conclusão que Agent 1 tinha certa ├─ Token spent: 100 tokens (Agent 1) + 150 (Agent 2) + 120 (Agent 3) + 100 (Agent 4) = 470 tokens ├─ Could have been: 100 tokens (1 agent direto) ├─ Waste: 370 tokens (78% waste rate) └─ Cost: 370 tokens × R$ 0.01/token = R$ 3.70 por request × 100K requests/mês = R$ 370K/mês waste
- Your question: "How do I reduce token waste?"
- Real answer: "Deploy fewer agents. 1-2 agents > 5+ agents."
O Problema: Multi-Agent Coordination Tax
Por quê agent swarms custam mais sem ganhar qualidade
=== WHAT IS COORDINATION TAX? ===
Definition: └─ Coordination tax = extra tokens spent on agents verifying/repeating work of other agents ├─ Because agents don't trust each other ├─ Because agents can't see each other's reasoning ├─ Because agents must re-validate decisions └─ Result: Exponential token increase, zero quality gain
=== SIMPLE EXAMPLE: SINGLE vs MULTI-AGENT ===
Scenario: Customer asks "Can I refund my subscription?"
--- SINGLE AGENT ARCHITECTURE ---
Agent (smart, general-purpose): ├─ Input: "Can I refund my subscription?" ├─ Step 1: Understand intent (refund request) ├─ Step 2: Check policy (refunds allowed within 30 days) ├─ Step 3: Check customer status (customer is 15 days in) ├─ Step 4: Check account balance (can process refund) ├─ Step 5: Generate response ("Yes, you can refund") ├─ Token cost: 200 tokens (all steps in one agent) ├─ Time: <1 second ├─ Quality: 95% accuracy (agent reasons through problem) └─ Result: GOOD (fast, cheap, accurate)
--- MULTI-AGENT ARCHITECTURE (5 agents) ---
Agent 1 (Intent classifier): ├─ Input: "Can I refund my subscription?" ├─ Process: NLP classification ├─ Output: Intent = REFUND_REQUEST ├─ Token cost: 80 tokens └─ Time: 0.5 seconds
Agent 2 (Policy checker): ├─ Input: Intent = REFUND_REQUEST ├─ Process: Look up refund policy ├─ Step 1: Search policy database ├─ Step 2: Parse policy rules ├─ Step 3: Extract refund conditions ├─ Output: "Refunds allowed within 30 days" ├─ Token cost: 120 tokens └─ Time: 0.8 seconds
Agent 3 (Customer status checker): ├─ Input: Customer ID + policy info ├─ Process: Look up customer account ├─ Step 1: Query customer database ├─ Step 2: Get subscription start date ├─ Step 3: Calculate days elapsed ├─ Output: "Customer is 15 days in (eligible)" ├─ Token cost: 100 tokens └─ Time: 1.2 seconds
Agent 4 (Validator): ├─ Input: All previous outputs ├─ Process: Cross-check all decisions ├─ Step 1: Verify intent classification (is refund correct?) ├─ Step 2: Verify policy interpretation (did Agent 2 read policy right?) ├─ Step 3: Verify customer status (is 15 days correct?) ├─ Step 4: Verify logic (all checks pass?) ├─ Output: "All checks verified, refund is allowed" ├─ Token cost: 150 tokens (re-reading all previous outputs) └─ Time: 1.5 seconds
Agent 5 (Response generator): ├─ Input: Validated decision ├─ Process: Generate natural response ├─ Output: "Yes, you can refund your subscription" ├─ Token cost: 80 tokens └─ Time: 0.5 seconds
Total: ├─ Token cost: 80 + 120 + 100 + 150 + 80 = 530 tokens (2.65x more) ├─ Time: 5.5 seconds (5.5x slower) ├─ Quality: 95% (same as single agent) ├─ Coordination tax: 530 - 200 = 330 tokens wasted (62% waste) └─ Result: WORSE (expensive, slow, no quality gain)
=== REAL EXAMPLE: OpenAI Codex Developer Case ===
Scenario: Refactor Python code
Multi-agent approach (1,393 agents in swarm): ├─ Agent 1-100: Parse code structure ├─ Agent 101-300: Identify refactoring opportunities ├─ Agent 301-600: Generate refactoring suggestions ├─ Agent 601-900: Validate suggestions ├─ Agent 901-1,200: Test suggestions ├─ Agent 1,201-1,393: Decide best refactoring ├─ Token cost: $20,000 ├─ Result: "Refactored code, quality similar to baseline" └─ Conclusion: All agents redundantly checking same work
Single-agent approach (1 Astra agent): ├─ Agent: "Refactor this Python code" ├─ Process: Understand code → generate refactorings → test → return best ├─ Token cost: ~$500 (40x cheaper) ├─ Result: "Refactored code, same quality as multi-agent" └─ Conclusion: Coordination tax was 95% of the cost
=== WHY AGENTS DON'T TRUST EACH OTHER ===
Agent A outputs: "Customer can refund" Agent B thinks: ├─ "Did Agent A understand the policy correctly?" ├─ "Did Agent A check the right customer database?" ├─ "Did Agent A make any mistakes?" ├─ "Better double-check by reading the policy again" ├─ "Better query the database again" └─ Result: Re-does work that Agent A already did
Root cause: ├─ Agents can't see other agents' reasoning process (black box) ├─ Agents have no confidence score on other agents' outputs ├─ Agents default to "verify everything" (conservative) ├─ Agents end up duplicating work (coordination tax)
=== THE MATH: HOW COORDINATION TAX SCALES ===
With N agents doing same task: ├─ Agent 1 cost: C tokens (does real work) ├─ Agent 2 cost: C tokens (verifies Agent 1 + does work) ├─ Agent 3 cost: C tokens (verifies Agent 1+2 + does work) ├─ Agent N cost: C tokens (verifies all + does work) ├─ Total cost: N × C tokens ├─ Output quality: ≈ C tokens (1 agent doing correctly) ├─ Coordination tax: (N-1) × C tokens (pure waste) ├─ Efficiency: 1/N (with 5 agents = 20% efficiency, 80% waste)
Example: ├─ 1 agent: 200 tokens, 95% accuracy ├─ 3 agents: 600 tokens (3x cost), 96% accuracy (+1% improvement) ├─ 5 agents: 1,000 tokens (5x cost), 96.5% accuracy (+1.5% improvement) ├─ 10 agents: 2,000 tokens (10x cost), 97% accuracy (+2% improvement) ├─ Conclusion: Cost grows linearly, quality improvement negligible
=== WHERE COORDINATION TAX HAPPENS ===
In your multi-agent SaaS: ├─ Agent communication: Agents reading each other's outputs (tokens) ├─ Validation: Agents re-checking previous agent decisions (tokens) ├─ Redundancy: Agents querying same database twice (tokens) ├─ Uncertainty: Agents uncertain about other agents' confidence (more checking) └─ Result: 2-10x token cost increase per request
A Solução: Single-Agent ou Dual-Agent (máximo)
Arquitetura que funciona
=== RECOMMENDED ARCHITECTURE ===
=== OPTION 1: SINGLE-AGENT (Best for most cases) ===
When to use: ├─ Task is not extremely complex (most customer interactions) ├─ Task has clear input/output ├─ Task fits in 1 context window ├─ Goal is cost efficiency + speed └─ Quality is acceptable with 1 LLM call
Architecture: └─ Agent (general-purpose, smart) ├─ Input: User request ├─ Process: Understand → reason → decide → respond ├─ Output: Customer response └─ Cost: Minimal (1 LLM call)
Example (Customer support): └─ Agent: "Answer customer support questions" ├─ Input: "Why was I charged twice?" ├─ Reasoning: │ ├─ Understand: Customer has billing issue │ ├─ Search: Look up customer's billing history │ ├─ Reason: Find root cause (double charge) │ ├─ Decide: Offer refund + explanation │ └─ Generate: Craft response └─ Output: "You were charged twice due to system error. We'll refund $X in 3 days."
Cost: ├─ Per request: ~2,000 tokens × R$ 0.001/token = R$ 2 ├─ 100K requests/month: R$ 200.000/month └─ Efficiency: 100% (no waste)
Quality: ├─ Accuracy: 92-95% (LLM reasoning is good) ├─ Latency: <1 second ├─ User satisfaction: 85%+ (customer happy with response) └─ Result: GOOD (cheap, fast, acceptable quality)
=== OPTION 2: DUAL-AGENT (For complex tasks) ===
When to use: ├─ Task requires division of responsibility ├─ Agent 1 does reasoning, Agent 2 does validation (not duplication) ├─ Clear handoff between agents (no redundancy) ├─ Goal is quality + speed └─ Can tolerate 2-3x cost increase
Architecture: └─ Agent 1 (Reasoner): Does main work └─ Agent 2 (Validator): Only checks for errors (not re-doing work)
Key: Agent 2 is VALIDATOR, not DUPLICATOR ├─ Agent 2 does NOT re-do Agent 1's work ├─ Agent 2 only checks: "Is this response safe/accurate/appropriate?" ├─ Agent 2 cost: ~500 tokens (small, fast check) ├─ Total cost: ~2,500 tokens (1.25x vs single-agent)
Example (Customer support with risk): ├─ Agent 1 (Reasoner): Decide on refund amount │ ├─ Input: Customer complaint │ ├─ Reasoning: Calculate refund based on policy │ ├─ Output: "Offer refund of R$ 250" │ └─ Cost: 1,500 tokens └─ Agent 2 (Validator): Check if decision is safe ├─ Input: Agent 1's decision ("refund R$ 250") ├─ Check: Is refund within policy limits? ├─ Check: Is customer account in good standing? ├─ Check: Does this violate any rules? ├─ Output: "Decision is safe, approve" └─ Cost: 500 tokens
Total cost: 2,000 tokens (vs 2,500 single-agent with extra reasoning) Quality: 96%+ (reason + validation) Latency: 1-2 seconds Result: GOOD (slightly more expensive, better quality for risky decisions)
=== OPTION 3: MULTI-AGENT (NEVER) ===
Why NOT to use: ├─ Coordination tax kills economics ├─ Quality doesn't improve significantly ├─ Complexity increases (hard to debug) ├─ Cost scales 5-10x (no ROI) └─ Latency increases (agents waiting on each other)
Example of multi-agent waste: ├─ 5 agents in sequence ├─ Cost: 5 × 2,000 tokens = 10,000 tokens ├─ Latency: 5 × 1 second = 5 seconds ├─ Quality: 96% (same as dual-agent) ├─ Coordination tax: 6,000 tokens (60% waste) └─ Conclusion: AVOID (don't use)
Seu Checklist: Audit multi-agent waste
Como calcular quanto você está jogando fora
=== CURRENT STATE AUDIT ===
[ ] Count your agents: ├─ How many agents do you have? ___ ├─ What does each agent do? │ ├─ Agent 1: _____________ │ ├─ Agent 2: _____________ │ ├─ Agent 3: _____________ │ └─ Agent N: _____________ └─ Do agents call each other? YES/NO
[ ] Measure token usage: ├─ Check your API logs (OpenAI, Anthropic, etc) ├─ Calculate: Tokens/request × requests/month = total tokens/month ├─ Current: ___ tokens/month ├─ Cost: ___ tokens × R$ 0.001/token = R$ ___/month └─ Track: How has token usage changed over 3 months? (up/down/stable)
[ ] Analyze each agent interaction: ├─ When Agent 1 outputs, does Agent 2 input same data? YES/NO ├─ Is Agent 2 re-doing work of Agent 1? YES/NO ├─ Is Agent 2 verifying (not duplicating)? YES/NO ├─ How many tokens does Agent 2 spend on re-checks? ___ └─ Result: Coordination tax per request = ___ tokens
[ ] Calculate waste: ├─ Tokens per request (current): ___ tokens ├─ Tokens if 1 agent only: ___ tokens (estimate) ├─ Waste per request: ___ - ___ = ___ tokens ├─ Waste % per request: ___ / ___ = ___% ├─ Monthly waste: ___ tokens × requests/month = ___ tokens ├─ Monthly cost of waste: ___ tokens × R$ 0.001/token = R$ ___/month ├─ Annual waste: R$ ___ × 12 = R$ ___/year └─ Question: Is this acceptable? YES/NO
[ ] Quality audit: ├─ With multi-agent: Accuracy ___% (measure) ├─ Estimate single-agent: Accuracy ___% (reasonable estimate) ├─ Quality gain: ___% - ___% = ___% (usually 0-2%) └─ ROI: Is quality gain worth the cost? YES/NO
=== REFACTOR PLAN ===
[ ] Option A: Migrate to single-agent ├─ Current: Multiple agents ├─ Future: 1 smart agent (general-purpose) ├─ Cost savings: 60-80% token reduction ├─ Quality: May drop 1-2% (acceptable) ├─ Speed: Improves 2-3x ├─ Effort: Moderate (re-prompt engineering) └─ Recommendation: Try this first
[ ] Option B: Migrate to dual-agent (if quality critical) ├─ Current: Multiple agents (5+) ├─ Future: Agent 1 (reason) + Agent 2 (validate only) ├─ Cost savings: 50-70% token reduction (vs current) ├─ Quality: Maintain or improve slightly ├─ Speed: Improves 2-3x ├─ Effort: Moderate └─ Recommendation: For high-risk decisions only
[ ] Option C: Hybrid (specific tasks) ├─ Low-risk tasks: Single agent (fastest, cheapest) ├─ High-risk tasks: Dual agent (validator for safety) ├─ Cost savings: 40-60% (vs current multi-agent) ├─ Quality: Maintained (single + dual as needed) ├─ Effort: Moderate-High (build routing logic) └─ Recommendation: Best balance
=== IMPLEMENTATION (Next 30 days) ===
[ ] Week 1: Audit ├─ Measure current token usage ├─ Identify coordination tax ├─ Calculate monthly waste ├─ Get buy-in from team └─ Decision: Which option (A/B/C)?
[ ] Week 2: Design ├─ If Option A: Design single-agent prompt ├─ If Option B: Design validator agent rules ├─ If Option C: Design routing logic └─ Test: Build MVP with new architecture
[ ] Week 3-4: Rollout ├─ Parallel run: New vs old architecture ├─ Measure: Token usage, quality, latency ├─ Compare: New vs old side-by-side ├─ Decision: Is new better? YES/NO └─ Full rollout: 100% on new architecture
=== SUCCESS METRICS ===
[ ] Token efficiency: ├─ Before: ___ tokens/request ├─ After: ___ tokens/request ├─ Reduction: ___% (target: 50-80%) └─ Monthly savings: R$ ___
[ ] Quality: ├─ Before: ___% accuracy ├─ After: % accuracy ├─ Change: ±% (target: -0 to +2%, acceptable if -1 to +1%) └─ Customer satisfaction: ___% (target: maintain or improve)
[ ] Speed: ├─ Before: ___ seconds latency ├─ After: ___ seconds latency ├─ Improvement: ___x faster (target: 2-5x) └─ User experience: Better/same/worse
[ ] ROI: ├─ Annual token savings: R$ ___ ├─ Refactor cost: R$ ___ ├─ Net savings: R$ ___ - R$ ___ = R$ ___ ├─ Payback: ___ months (target: <3 months) └─ Multi-year benefit: R$ ___ (5-year savings)
Conclusão: Simples é melhor
O que OpenAI Codex developer está sinalizando:
-
Multi-agent is an anti-pattern (not a feature)
- You think: "More agents = better (divide and conquer)."
- Reality: "More agents = coordination tax (agents verify each other's work)."
- Implication: "Simples é melhor. 1-2 agents > 5+ agents."
-
Coordination tax is REAL (60-95% waste)
- You think: "Agents can work in parallel, cost is same."
- Reality: "Agents don't trust each other, redundantly check, waste tokens."
- Implication: "1,393 agents = $20K (waste). 1 agent = $500 (efficient)."
-
Quality doesn't improve (1-2% gain max)
- You think: "More verification = better quality."
- Reality: "More agents = more cost, same quality (1-2% gain max)."
- Implication: "Quality plateau happens fast, then cost just increases."
-
Architecture matters more than LLM (framework > model)
- You think: "Better LLM = better output."
- Reality: "Simpler architecture (1 smart agent) beats complex architecture (10 dumb agents)."
- Implication: "Refactor first, upgrade LLM second."
-
Latency increases with multi-agent (sequential slowdown)
- You think: "Agents work in parallel, latency is same."
- Reality: "Agents call each other sequentially, latency multiplies."
- Implication: "1 agent = 1 second. 5 agents = 5+ seconds."
Your decision today:
- Keep current multi-agent (expensive, slow, wastes tokens)
- Migrate to single-agent (cheap, fast, acceptable quality)
- Migrate to dual-agent (balanced, for high-risk tasks)
- Hybrid (simple tasks = single, complex tasks = dual)
Recommendation: Audit your current setup THIS WEEK.
- Measure token usage
- Calculate coordination tax
- Find out if you're wasting R$ 100K-500K/month
- Make decision based on data
- Refactor in next 30 days
Na OpenClaw:
Ajudamos SaaS builders otimizar agent arquitetura:
- Agent audit: Quanto token você está jogando fora? (assessment)
- Architecture redesign: Migrar multi-agent → single-agent (optimization)
- Performance optimization: Reduce latency, improve quality, cut costs
- Prompt engineering: Single agent que faz trabalho de 5 agents
- Monitoring: Track token efficiency, catch coordination tax early
Você pode manter 5+ agents (e pagar R$ 300K/mês em tokens).
Ou você pode deploy 1 smart agent AGORA (pague R$ 50K/mês, economize R$ 250K/mês, 5x mais rápido).
Single-Agent Architecture | Token Efficiency | Coordination Tax Audit →
Publicado em 17 de setembro de 2026