Auto-Archive
Overview
Section titled “Overview”toon-memory automatically archives entries older than 30 days or with expired TTL to keep your memory clean.
Manual Archive
Section titled “Manual Archive”memory_archive()// 📦 Archivadas 5 entradas antiguas// 📋 Quedan 42 entradas activasHow It Works
Section titled “How It Works”- Entries older than 30 days are moved to
archive.toon - Entries with expired TTL are also archived
- Active memory stays under 100 entries
- Archived entries are preserved for history
- Can be triggered manually or automatically
TTL-based Archiving
Section titled “TTL-based Archiving”Entries with a ttl field are archived when the TTL expires, regardless of the 30-day rule:
entries[3|]{id|category|key|content|file|tags|date|ttl}: a1b2c3d4|decision|permanent|This stays forever|file.ts||2026-07-10| e5f6g7h8|knowledge|sprint-info|Sprint ends Friday|file.ts||2026-07-10|7d i9j0k1l2|bug|temp-fix|Temporary workaround|file.ts||2026-07-10|2026-07-15In this example:
permanent— no TTL, never expires by TTLsprint-info— expires 7 days after creationtemp-fix— expires on a specific date
File Structure
Section titled “File Structure”.toon-memory/memory/├── data.toon # Active memory (< 30 days, no expired TTL)└── archive.toon # Archived entries (> 30 days or expired TTL)Archive Format
Section titled “Archive Format”version: 1archived[5|]{id|category|key|content|file|tags|date}: a1b2c3d4|decision|old-decision|This was decided...|src/old.ts|decision|2026-06-01 e5f6g7h8|pattern|old-pattern|This pattern was used...|src/pattern.ts|pattern|2026-06-15Configuration
Section titled “Configuration”| Setting | Default | Description |
|---|---|---|
| Max entries | 100 | Maximum active entries |
| Archive days | 30 | Days before archiving |
| Archive file | archive.toon |
Where archived entries go |
Use Cases
Section titled “Use Cases”- Keep memory clean — Prevent unlimited growth
- Historical reference — Old decisions still accessible
- Performance — Faster searches with fewer entries
- Temporary context — TTL handles deadlines, sprints, time-sensitive notes