Shared Memory

advanced
ArchitecturesLast updated: 2025-01-15
Also known as: collaborative memory

What is Shared Memory?


Shared memory refers to memory systems that are accessible by multiple agents, enabling coordination, collaboration, and information sharing across agent teams. Rather than each agent maintaining isolated private memory, shared memory provides a common space where agents can store observations, share findings, coordinate actions, and build collective knowledge. This shared context enables more sophisticated multi-agent behaviors and better team performance on complex tasks.


Implementation approaches vary based on the level of sharing and access control needed. Simple shared memory might be a common message board or shared document store where all agents can read and write. More sophisticated systems implement selective sharing with permissions, different memory scopes (private, team-level, global), or structured coordination primitives like locks or transactions. The memory system must handle concurrency concerns when multiple agents access or modify shared state simultaneously.


Shared memory is crucial in multi-agent frameworks like CrewAI where agents with different roles collaborate on complex tasks. It enables patterns like one agent researching information that another agent uses for writing, agents building on each other's work, or collective refinement of solutions. Challenges include managing consistency when agents have different views or make conflicting updates, preventing information overload as shared memory grows, and designing appropriate sharing boundaries that balance collaboration benefits against coordination overhead.


Related Terms