Multi-Agent Teams: Shared Memory vs. Process-Style Isolation
Choosing the wrong coordination model will either drown agents in accumulated context or scatter their work across unreadable logs. Mapping agent roles to OS processes and file-permission layers gives a concrete way to reason about isolation, handoffs, and fault containment in production AI workflows.
Two coordination models dominate multi-agent designs: shared memory and independent processes. Shared memory works like a relay: the next agent inherits the full work log, so no detail is lost, but the log grows until it buries the one who takes over. To keep a handoff consistent, you can replace the entire role specification when permissions or boundaries change, or consult a behavior manual on demand when only knowledge, workflow, or style differ.
Independent processes mirror an operating system: each agent has private memory, and creation, cancellation, and inspection map to fork, kill, and ps. This model isolates failures and runs truly parallel, but it requires a communication contract up front, and debugging means piecing together logs from several departments. Both models ground in a layered file cabinet: private drawers for scratch work, a public desktop with locks for shared artifacts, read-only external drives, and a system tool cabinet. Agents exchange paths, not content, which keeps context light.
The command pipe needs messaging, progress checkpoints, graceful shutdown with child cleanup, and dynamic resource allocation. No model wins outright: shared memory is coherent but thickens, isolation is clean but pays in coordination effort. Choosing which one fits the task's failure pattern is the hard part.
The OS analogy transfers directly: agent lifetimes and isolation can be managed with the same tools as processes, so decades of systems programming experience apply.
The choice between a full role-spec swap and a behavior manual is a cost-risk tradeoff: re-initialization is expensive but tightens permissions, while manuals are cheap but loosen control.
Passing paths instead of content keeps agent context bounded, avoiding the gradual bloat that kills shared-memory systems.
Multi-agent failures are often communication design problems rather than model quality problems; the article treats them as process and pipe issues.
I deeply relate to the part about working separately relying on communication. Previously I had two agents each write half of a document, and the interface descriptions didn't match. Later I made it a rule to sync context once before starting and it stabilized. I've seen several Chinese practical retrospectives on multi-agent collaboration on ai345, and it's convenient to look up by scenario.