Hierarchical Memory
Four-scope durable memory system with auto-compression, pinned facts, and version tracking.
Hierarchical Memory
Steadybase's memory system is a hierarchical durable key-value store implemented as a long-running Temporal workflow. Unlike stateless AI systems that forget everything between sessions, Steadybase workers accumulate knowledge over time.
Memory Scopes
Memory is organized into four hierarchical scopes:
Organization
Scope: org
Company-wide facts shared across all workers:
- ICP (Ideal Customer Profile) definitions
- Total pipeline values and targets
- Strategic use cases and priorities
- Pricing frameworks and discount policies
Team
Scope: team
Team-level context:
- AE territory assignments and coverage maps
- Active marketing campaigns
- Messaging frameworks and talk tracks
- Team-specific playbooks
Worker
Scope: worker
Individual worker memories:
- Past research findings
- Learned patterns and calibrations
- Relationship context with accounts
- Skill-specific knowledge
Session
Scope: session
Temporary conversation context:
- Current chat context
- Active task parameters
- Intermediate computation results
Session memories are not persisted beyond the active session.
Key Features
Auto-Compression
The memory system automatically compresses stale entries to prevent unbounded growth:
- Entries older than 24 hours that are not pinned are candidates for compression
- Compression merges related entries and removes redundant information
- The
compressMemorysignal can be sent to trigger manual compression
Pinned Facts
Important memories can be pinned to survive auto-compression:
Pinned facts remain in memory indefinitely until explicitly updated or unpinned.
Version Tracking
Every memory entry tracks its version number, incremented on each write. This provides an audit trail of how knowledge evolves:
Health Monitoring
Memory health can be monitored per worker:
Returns:
- Total memory entries
- Compression ratio
- Staleness metrics
- Pinned vs. unpinned breakdown
Memory Signals
The Memory Store workflow accepts three signals:
| Signal | Purpose |
|---|---|
writeMemory | Store or update a memory entry |
compressMemory | Trigger manual compression |
pinMemory | Toggle pin status on an entry |
Memory Queries
| Query | Purpose |
|---|---|
readMemory | Read a specific memory entry by scope and key |
getHealth | Get memory health metrics |
getAllMemories | List all entries (with optional scope filter) |