Dynamic memory with compression that automatically manages context window limits by compressing old messages while preserving important information.
| Label | Property | Type | Description | Default Value | Is Required |
|---|
| Storage | storage | botdojo/interface/storage | Optional storage interface for saving tool outputs to files | null | ✅ |
Properties
| Label | Property | Type | Description | Default Value | Is Required |
|---|
| Memory Key | memoryKey | botdojo/types/string | | compact_memory | |
| Max Context Window (tokens) | maxContextWindow | botdojo/types/number | Maximum number of tokens allowed in context window (optional - defaults to value set by setMaxContextWindow or 32000) | null | ✅ |
| Compression Percentage | compressPercentage | botdojo/types/number | Start compression when memory exceeds this percentage of max context window (0.0-1.0) | 0.7 | |
| Max Default Window (chars) | maxDefaultWindow | botdojo/types/number | Character window size for compression (compressed messages show first/last N/2 chars) | 1000 | |
| Enable Token Counting | enableTokenCounting | botdojo/types/boolean | Use accurate token counting vs character-based estimation | true | |
| Min Messages to Compress | minMessagesToCompress | botdojo/types/number | Minimum number of messages required before compression begins | 5 | |
| Compression Preservation Ratio | compressionPreservationRatio | botdojo/types/number | Ratio of original content to preserve when compressing (0.0-1.0) | 0.3 | |
| Max Tool Output Chars | maxToolOutputChars | botdojo/types/number | Automatically compress tool outputs longer than this many characters | 2000 | |
Output
| Label | Property | Type | Description | Default Value |
|---|
| Memory | memory | botdojo/interface/memory | Compact memory with dynamic compression | null |
| Model Context | modelContext | botdojo/interface/model_context | Compact memory management model context with MCP tools | null |