Heleni Memory Architecture
by @netanel-abergel
Honcho-inspired memory architecture for PA agents. Use when writing to MEMORY.md, ending a significant conversation, or deciding what to remember long-term....
clawhub install heleni-memory-architectureπ About This Skill
name: memory-architecture version: "1.0.0" description: "Honcho-inspired memory architecture for PA agents. Use when writing to MEMORY.md, ending a significant conversation, or deciding what to remember long-term. Implements two key patterns: deductive memory (not just facts, but logical conclusions) and session summaries (capture context before it disappears)."
Load Local Context
CONTEXT_FILE="/opt/ocana/openclaw/workspace/skills/memory-architecture/.context"
[ -f "$CONTEXT_FILE" ] && source "$CONTEXT_FILE"
Then use: $WORKSPACE, $MEMORY_FILE, $WHATSAPP_MEMORY_DIR, $OWNER_TIMEZONE, etc.
Memory Architecture Skill (Honcho-inspired)
Core Principle
Two types of memory, three tiers. Inspired by Honcho/Hermes Agent memory system.
Memory Types
[FACT] β Explicitly stated
Something the owner said directly. > "Netanel works until 20:00" β [FACT][DEDUCED] β Logical conclusion from behavior
Something inferred from patterns, corrections, or repeated behavior. > "Netanel prefers execution over explanation" β [DEDUCED] (inferred from repeated feedback pattern)Rule: After any interaction where a pattern becomes clear β write a [DEDUCED] entry. Don't wait for the owner to say it explicitly.
Memory Tiers
| Tier | Where | When to write |
|---|---|---------|
| Working | In-session context | Available automatically |
| Daily | memory/daily/YYYY-MM-DD.md | End of every significant conversation (5+ exchanges) |
| Projects | memory/projects/ | Ongoing context per topic/project β open loops, status, decisions |
| Long-term | MEMORY.md | When pattern repeats 2+ times, or explicitly asked |
Project Files
For active, multi-session work (rollouts, ongoing tasks, recurring topics), maintain a project file:memory/projects/pa-rollout.md
memory/projects/crons-health.md
memory/projects/my-project.md
Each project file should contain:
Load on demand: Read the relevant project file when that topic comes up β not every session. Daily files are raw log. Project files are living context.
Rule: If a task or decision needs to be remembered tomorrow β put it in the project file, not just the daily log.
Session Summary Rule
At the end of any conversation with 5+ meaningful exchanges, append to memory/YYYY-MM-DD.md:
## Session Summary β HH:MMDecisions made:
[list] Tasks completed:
[list] Deduced patterns:
[DEDUCED] [observation] Promote to MEMORY.md?
[ ] Yes: [what]
[x] No
When to promote to MEMORY.md:
Writing Deduced Memories
After a correction or repeated behavior, write:
- [DEDUCED] β evidence:
Examples:
[DEDUCED] Prefers English for work docs β corrected me when I created Hebrew doc (2026-04-03)[DEDUCED] Expects autonomous execution without asking permission for reversible tasks β never asks why I acted autonomously[DEDUCED] Reads messages outside work hours but won't always respondWhat NOT to remember
Memory Quality Checklist
Before writing to MEMORY.md, ask:
Self-Review Cron Loop
For continuous self-improvement, set up two daily crons:
Midday (13:00 local):
openclaw cron add \
--name "heleni-midday-self-review" \
--cron "0 13 * * *" \
--tz "Asia/Jerusalem" \
--session isolated \
--message "Run midday self-review: read today's memory file, find mistakes or corrections from this morning, update MEMORY.md with [DEDUCED] lessons if needed, commit to git. Silent if nothing to fix." \
--timeout-seconds 180
Nightly (23:00 local):
openclaw cron add \
--name "heleni-internal-self-review" \
--cron "0 23 * * *" \
--tz "Asia/Jerusalem" \
--session isolated \
--message "Run nightly self-review: read today's full memory file + last 3 MEMORY.md entries. Find: repeated mistakes, patterns to promote to long-term memory, rules to tighten. Update MEMORY.md and/or relevant SKILL.md files. Commit to git with message 'Self-review YYYY-MM-DD: [what changed]'. Silent if nothing to improve." \
--timeout-seconds 180
Why twice a day:
Memory Compaction (Prevent Bloat)
Left unchecked, MEMORY.md and AGENTS.md grow unbounded β causing context window bloat and degraded performance.
Targets:
MEMORY.md β max 175 linesAGENTS.md β max 60 linesWhen to compact:
How to compact: 1. Read MEMORY.md fully 2. Merge duplicates, remove outdated entries, trim examples 3. Keep: active rules, key contacts, deduced patterns still valid 4. Remove: removed crons, resolved issues, one-time events 5. Commit to git after
Weekly compaction cron:
openclaw cron add \
--name "weekly-memory-compaction" \
--cron "0 7 * * 0" \
--session isolated \
--model "anthropic/claude-haiku-4-5" \
--message "Weekly memory compaction: Read MEMORY.md and AGENTS.md. Remove outdated entries, merge duplicates. Target: MEMORY.md <175 lines, AGENTS.md <60 lines. Git push after. NO_REPLY." \
--announce \
--timeout-seconds 120
Signal you need compaction:
Production Notes
/opt/ocana/openclaw/workspace (not ~/.openclaw/workspace)memory/whatsapp/groups//context.md or memory/whatsapp/dms//context.md @, ., + with -