What is Shared Memory?
Shared Memory is a persistent storage system that maintains information accessible to multiple users across all interactions with their digital twins. Unlike User Memory (which is private to each individual), Shared Memory creates a common knowledge base that can be leveraged by teams, departments, or entire organizations.Collaborative Storage
Centralized information bank accessible across teams and organizations
Persistent & Scalable
Data persists across all users, sessions, and digital twins indefinitely
Secure & Controlled
Access controls determine who can read, write, or manage shared parameters
Namespace Organization
Structured categorization enables efficient retrieval and management
Technical Architecture
Storage Model
Shared Memory uses a key-value storage architecture organized by namespaces:- Namespace: Logical grouping for related parameters (e.g.,
company_standards
,technical_stack
) - Key Name: Unique identifier within namespace
- Value: The stored data (strings, numbers, JSON objects)
- Description: Metadata explaining purpose and usage
- Shared Flag: Boolean indicating shared vs. user-private storage
Access Patterns
- Read Operations
- Write Operations
- Delete Operations
Retrieval Methods:
- Search by namespace:
get_from_memory("company_standards", "true")
- Search by keyword:
get_from_memory("typescript", "true")
- Retrieve all:
get_from_memory("", "true")
- Token-based search with case-insensitive matching
- Returns CSV format to lower token usage:
namespace,key,value,description,shared,created
- Efficient for both targeted and broad queries
Technical Benefits
Performance & Scalability
Minimal Latency Access
Shared parameters are saved and retreived locally during conversations to minimize latency
Scalability
Supports thousands of parameters without performance degradation
Efficient Retrieval
Token-based search enables fast lookups across large parameter sets
Batch Operations
Store or retrieve multiple parameters in single operations
Data Consistency
Single Source of Truth
Eliminates data duplication and conflicting information across users
Atomic Updates
Changes propagate immediately to all users of you digital twin
Version Control
Timestamp tracking enables audit trails and change history
Integration Capabilities
Assistant Integration
Use
set_in_memory
and get_from_memory
tools in Assistant instructionsAPI Access
Programmatic access through memory management tools
Namespace Isolation
Logical separation prevents cross-contamination of different data domains
Flexible Schema
Store any data type—strings, numbers, JSON objects, arrays
Use Cases
Development Teams
Store technical standards that all developers reference:- Consistent tooling and framework versions across projects
- Automated enforcement through Assistant integration
- Reduced onboarding time for new developers
Enterprise Organizations
Maintain compliance and security standards:- Automated compliance checking across all user interactions
- Audit trail for regulatory requirements
- Consistent security posture organization-wide
Documentation Teams
Standardize writing conventions and templates:- Consistent documentation quality across teams
- Automated style checking through Assistants
- Reduced editorial review time
Implementation Guide
Setting Up Shared Memory
1
Identify Critical Standards
Determine which organizational knowledge should be centralized (compliance rules, technical standards, templates)
2
Design Namespace Structure
Create logical categories that reflect your organizational structure:
company_standards
- Organization-wide policiestechnical_stack
- Approved technologies and patternscompliance_rules
- Regulatory requirementsproject_templates
- Standard formats and structures
3
Populate Initial Parameters
Store foundational standards using natural language or Assistant instructions:
4
Configure Access Controls
Define who can read, write, and manage shared parameters based on organizational roles
5
Integrate with Assistants
Update Assistant instructions to reference shared memory for automated enforcement
Assistant Integration
Example: Code Review AssistantManaging Shared Memory
Viewing Parameters
Natural Language Queries:
Statistics are returned alongside the parameters and used by the Memory Optimizer assistant
Adding/Updating Parameters
Natural Language:
Review the structure of the parameters saved into the shared memory in the
Agent Details
Namespace Organization
Best Practices:Hierarchical Structure
Use descriptive namespaces that reflect organizational domains:
company_standards/technical
company_standards/security
team_preferences/frontend
team_preferences/backend
Clear Descriptions
Include detailed descriptions explaining:
- Purpose of the parameter
- When it applies
- Who should reference it
- Related parameters
Consistent Naming
Use clear, descriptive key names:
primary_language
notlang
code_review_approvals
notapprovals
api_rate_limit_enabled
notrate_limit
Regular Maintenance
Schedule periodic reviews to:
- Remove outdated parameters
- Update evolving standards
- Consolidate duplicate information
Shared Memory vs. User Memory
User Memory
Private Storage
- Accessible only to individual user
- Stores personal preferences and context
- User has full control
- Typically overrides shared memory for preferences
- Learning style preferences
- Individual project context
- Personal communication style
- Private notes and reminders
Shared Memory
Collaborative Storage
- Accessible to multiple authorized users
- Stores organizational standards and knowledge
- Managed by administrators/team leads
- Can enforce mandatory standards
- Company policies and compliance
- Technical standards and patterns
- Shared templates and workflows
- Organizational knowledge base
Advanced Features
Conditional Logic
Store context-dependent standards:Temporal Parameters
Include time-sensitive information:Batch Operations
Efficiently manage multiple parameters:Best Practices
1
Start with Critical Standards
Prioritize mandatory policies, compliance requirements, and security protocols that must be universally followed
2
Use Descriptive Namespaces
Organize parameters into logical categories that reflect your organizational structure and workflows
3
Document Thoroughly
Include detailed descriptions explaining purpose, context, and applicability of each parameter
4
Maintain Regularly
Review the shared memory to remove outdated information and update evolving values
5
Balance Control and Flexibility
Enforce mandatory standards strictly while allowing teams flexibility on non-critical preferences
6
Integrate with Assistants
Leverage memory tools in Assistant instructions for automated enforcement and consistency
Troubleshooting
Parameter Not Found
Symptoms: get_from_memory returns no results
Solutions:
- Verify namespace spelling
- Check shared flag is set to “true”
- Confirm parameter exists using broader search
- Verify access permissions
Conflicting Values
Symptoms: Users receive contradictory guidance
Solutions:
- Review priority hierarchy
- Mark mandatory standards explicitly
- Consolidate duplicate parameters
- Use conditional logic for context-dependent rules
Outdated Information
Symptoms: References to deprecated tools or old policies
Solutions:
- Schedule regular audits
- Implement change notification system
- Archive historical parameters
- Update Assistant instructions
Performance Issues
Symptoms: Slow retrieval or excessive token usage
Solutions:
- Use targeted namespace searches
- Avoid retrieving all parameters unnecessarily
- Consolidate related parameters
- Archive unused historical data
Summary
Shared Memory provides a scalable, persistent storage system that enables organizations to maintain consistent knowledge across all users and digital twins. By centralizing critical standards, policies, and organizational knowledge, teams achieve:- Zero-latency access to organizational standards
- Automated enforcement through Assistant integration
- Consistent quality across all user interactions
- Scalable knowledge management without performance degradation
Next Steps:
- Identify your organization’s critical standards to centralize
- Design a namespace structure that reflects your organizational domains
- Populate initial parameters using natural language or tools
- Integrate shared memory with custom Assistants for automated enforcement
- Schedule regular maintenance to keep shared memory current and relevant