☿ Autolycus · Memory

Temporal Awareness

Persistent memory grouped by entry age —
TODAY, YESTERDAY, N DAYS AGO, OLD

Temporal Awareness — Data Flow MEMORY.md / USER.md On disk at ~/.hermes/memories/ §-delimited entries with YYYY-MM-DD HH:MM prefix load_from_disk() Reads file, splits by § _parse_entry_date() re.match(r"^(\d{4}-\d{2}-\d{2})") _days_ago() today - date → int days _age_category() 0→TODAY, 1→YESTERDAY, ≤7→N DAYS, >7→OLD _group_by_age() Groups entries by category Sorts: fresh → old _render_block() Formats groups with headers ┌─ TODAY ─── │ entry └─ N entries format_for_system_prompt() Injected into system prompt before each agent response TODAY (0 days) Fresh entries YESTERDAY (1 day) Yesterday's entries N DAYS AGO (2-7) This week entries OLD (>7 days) ⚠ May be outdated DATE UNKNOWN No YYYY-MM-DD prefix USER.md — profile mtime In header: "USER PROFILE (who the user is) [X% — N/M chars] [Profile: dd month, hh:mm]" Key Principles 1. Read-time grouping — file on disk unchanged 2. Delimiter: § — entries can be multiline 3. Frozen snapshot — injected at session start, not mid-session 4. Group order: TODAY → YESTERDAY → N DAYS → OLD → DATE UNKNOWN 5. 40 tests — unit + integration, all pass Hallucination Protection • Old entries (>7d) — with ⚠ warning • Agent sees the age of each group • Memory scanning — injections blocked • Fresh entries always at the top of the injection • findings_to_wiki supplements architectural memory
40
unit tests
5
age categories
2
stores (MEMORY + USER)