Shared Memory for Multi-Agent SRE Systems
Agents need to know what their peers learned. The shared scratchpad, the consistency model, and the pruning policy that keeps it from becoming a kitchen sink.
The shared scratchpad
A structured object that all agents in the run can read and append to. Each agent's findings become available to subsequent agents.
Schema: each entry has agent_id, timestamp, type, content. Type is one of: hypothesis, evidence, decision, action_taken.
The scratchpad is the run's working memory. Persisted for the duration of the run; archived after.
Consistency model
Append-only. Agents cannot modify or delete prior entries. Conflicting hypotheses become two entries; the orchestrator picks the right one.
Read-your-writes. An agent can read the entry it just wrote, immediately. Other agents see it after the next read.
Total ordering by timestamp. The scratchpad is a sorted log; reads return entries in timestamp order.
Pruning policy
By default, no pruning during the run. The scratchpad is small (under 100 entries even for long runs); pruning is unnecessary.
If the scratchpad exceeds a size threshold, summarise the oldest half and replace with the summary. Rare in practice.
After the run completes, the scratchpad is archived. Useful for debugging; not in the agent's working memory anymore.
Resolving conflicts between agents
Two agents propose contradictory hypotheses. The orchestrator (or coordinator) reads both and picks based on confidence and supporting evidence.
Two agents propose contradictory actions. Hard stop: one of them is wrong. Escalate to human; do not pick automatically.
Agents update each other's findings as new data arrives. The append-only model means the latest is the authoritative; older entries become context.
Evaluating shared memory
Cases where one agent's finding should change another agent's behaviour: pass if it does, fail if downstream agents act on stale state.
Cases where two agents conflict: pass if the orchestrator picks correctly or escalates; fail if it picks the wrong one silently.
Cases of scratchpad bloat: pass if pruning kicks in; fail if the agent's prompt grows unbounded.