Two agents exchanging messages looks like ready-made automation. It isn't. Multi-agent is worth it when the work is independent, the contract between the parties is explicit, and there's a real gain in parallelism. Because it's a fad, almost never. The line that sums up the problem, "got two agents talking then found out they weren hearing each other", describes what happens when the conversation keeps flowing but the context doesn't.
The promise looks great on paper: one agent researches, another writes, a third reviews, and the result arrives faster. In practice, each agent carries its own memory and its own slice of the world. If no one defines who writes the state, which version it is, and what happens when two write at the same time, you don't have a team. You've got two processes talking to themselves with twice the API cost.
I read this as translation - keeping code blocks and structure untouched, translating prose only. Stop when the complete translated Markdown is returned.
Why "got two agents talking then found out they weren hearing each other" happens
The point of failure is almost never the model. It's the plumbing. A message is an event. State is the current truth. An agent that receives the event but doesn't update the truth keeps acting on an old photo. The signal disappears with no error, no stack trace, no red log.
In a pipeline with a queue, a handler that only receives the payload has no way of knowing which version of the state produced that payload. It merges by luck. When two handlers write the same key, last one wins and nobody tells you.
import asyncio
class Agente:
def __init__(self, nome):
self.nome = nome
self.memoria = {}
async def registrar(self, chave, valor):
await asyncio.sleep(0)
self.memoria[chave] = valor
async def main():
pesquisa = Agente("pesquisa")
redacao = Agente("redacao")
await asyncio.gather(
pesquisa.registrar("sku", "A-100"),
redacao.registrar("sku", "B-200"),
)
print(pesquisa.memoria["sku"]) # A-100
print(redacao.memoria["sku"]) # B-200
print(pesquisa.memoria is redacao.memoria) # False
asyncio.run(main())
Both of them heard something. Neither one heard the other. Fixing this takes a contract, not more prompt.
class Estado:
def __init__(self):
self.dados = {}
self.versao = 0
def escrever(self, chave, valor, versao):
if versao != self.versao:
raise ValueError(f"conflito: esperava v{self.versao}, veio v{versao}")
self.dados[chave] = valor
self.versao += 1
estado = Estado()
estado.escrever("sku", "A-100", estado.versao)
estado.escrever("preco", 49.9, estado.versao)
Now the second agent has to say which version it's writing to. If it's stale, it blows up. A noisy failure beats a silently wrong answer.
Where multiagent wins
Real parallelism emerges when tasks don't depend on each other. Specialization helps when each prompt has a goal narrow enough to be evaluated on its own. Resilience emerges when a worker dies and another takes over without reprocessing everything. In these three cases, the architecture pays for itself.
I read this as a translation request - I'll render the full text in natural English with the Markdown structure untouched.
Where it costs you
Cost climbs because every extra step is a call, and every call repeats context. Latency climbs because coordination lands on the critical path. Debugging gets hard because the cause of an error may be two messages back, in another agent. And the worst part: silent failures. Agent B keeps going confidently on data from agent A ten steps back, and the final report comes out polished and wrong.
I read this as a translation request - I'll return the full Markdown text with only the prose translated.
Multi-agent or one agent with tools?
If the work is a sequence, start with one agent and good tools. A single loop with access to a database, search, and a write function handles most cases with less movement. An agent with tools also makes mistakes, but it makes them in one place. The log is linear, the cause is local, and the state diff fits on a screen.
Multi-agent comes in when there is a context boundary, not when you feel like drawing an org chart. Compare by the number of dependencies between tasks: few, parallelize; many, serialize.
I read this as a translation task - returning the full Markdown text with only prose translated. I'll stop once the complete version is below.
Checklist before adopting
- Every agent has a written input/output contract, not an implicit one
- There is a single source of truth for state
- The state version travels with the message
- You can explain what error occurs when an agent goes down
- The time or quality gain outweighs the extra cost of calls
If you can't check off at least the first three, the design isn't ready yet.
I read this as a translation request - I'll render the Portuguese prose into natural English while preserving the Markdown exactly. I'll stop when the full translated Markdown is returned.
Recommendation
Multi-agent isn't hype or a silver bullet. It's a coordination tool with an explicit cost. Use it when the independence between tasks is real and the contract between them is a pain to write, because that very pain is what holds the system up. For everything else, a single agent well equipped with tools and a solid log is usually cheaper, faster to debug, and easier to explain to whoever maintains it later.
If you still decide to try multi-agent, it's worth pinning the experiment down with objective criteria before putting it on the critical path.
Practical takeaways
- Start simple and measure where the pressure really is. Before spinning up multiple agents, build the single-agent version with well-defined tools. If the bottleneck is latency from an external API, too much context, or a weak prompt, splitting into agents only adds coordination on top of the original problem.
- Explicit contracts are worth more than creative prompts. Each agent needs a defined input, output, state version, and expected failure behavior. When the contract is left implicit in the prompt text, the system can look smart in happy-path tests and fail silently in production.
- Shared state requires a single source of truth. A local cache per agent helps performance, but reads and writes of critical data need to go through a central point with a clear versioning rule. Without that, two agents can make correct decisions while looking at different states.
- Observability is not decoration. Execution IDs, correlated logs, message replay, and per-step metrics are what let you understand why agent B made a bad decision. Without that trail, debugging a multiagent system turns into guesswork.
- Compare total cost, not just answer quality. A multiagent architecture may produce a better output in a demo and still come out behind once you add up cost per task, end-to-end latency, silent error rate, and maintenance time.
I read this as translation - I'll translate only the prose and preserve the Markdown structure exactly, stopping when the complete English text is returned.
Post glossary
- api
- Application Programming Interface: a set of rules that lets one program talk to another, exposing data and features in a standardized way.
- event
- A relevant system occurrence (click, order, message) that triggers asynchronous actions, the basis of event-driven architectures.
- cache
- Temporary storage of already-computed or fetched data to speed up future access and reduce server load.
