Hipocampus: A Persistent Memory System for AI Agents Using Compaction Trees

✍️ OpenClawRadar📅 Published: March 23, 2026🔗 Source
Hipocampus: A Persistent Memory System for AI Agents Using Compaction Trees
Ad

Solving the Persistent Memory Problem for AI Agents

Hipocampus is a persistent memory system built specifically for AI agents like Claude Code and OpenClaw to solve the problem of agents forgetting everything when sessions end. The creator spent thousands on API costs and found existing solutions inadequate: MEMORY.md overflows after a week, RAG/vector search requires knowing what to search for, large context windows degrade attention and increase token costs, and hosted memory services add dependencies and bills.

Ad

How Hipocampus Works

The core innovation is a compaction tree that organizes conversation history through five compression levels:

  • Raw conversation data
  • Daily summaries
  • Weekly compressions
  • Monthly aggregations
  • Root level with topic index

The root level is called ROOT.md, which serves as a comprehensive topic index. Based on approximately two months of daily OpenClaw sessions as a personal assistant, the system maintains:

Active Context (recent ~7 days)

  • 2026-03-18: FOMC recap briefed, portfolio rebalancing options drafted, 2 email replies sent
  • 2026-03-17: Tokyo flight comparison saved (3 options), hotel vs Airbnb analysis done
  • 2026-03-16: Morning briefing flagged earnings miss on watchlist stock, spending alert triggered
  • 2026-03-15: Weekly expense report auto-generated, dentist appointment rescheduled

Recent Patterns

  • Checks portfolio + market news every morning — pre-generate briefing before 8am
  • Travel planning active (Tokyo trip Apr 1-5) — expect follow-ups on itinerary, restaurants, JR pass
  • Email tone preference: direct, short, no corporate fluff — mirror this in all drafts
  • Dining spending trending up — nudge if weekly total > $150
  • Tends to forget follow-ups with contacts met at events — auto-remind after 2 weeks
  • Weekend = personal errands + language study. Weekday = work + investing

Historical Summary

The system maintains detailed weekly summaries going back months, including:

  • 2026-03 W3: FOMC monitoring, Tokyo trip planning, Q1 expense analysis, 2 networking follow-ups, car insurance renewal research
  • 2026-03 W2: earnings season alerts (4 holdings reported), weekly meal prep plan started, dentist/doctor appointments booked, apartment lease renewal negotiation draft
  • 2026-03 W1: monthly portfolio review, competitor monitoring report for side project, JLPT N3 mock test (68% — grammar weak), tax docs sent to CPA
  • 2026-02 W4: apartment search finalized (signed lease), morning briefing format v2 (added calendar preview), Valentine's dinner reservation, 3 networking follow-ups

Topics Index

ROOT.md includes a comprehensive topics index covering areas like:

  • daily-briefing: morning-news, portfolio-summary, calendar-preview, pending-follow-ups
  • investing: portfolio-monitoring, stock-alerts, watchlist, earnings-tracking, sector-analysis
  • macro: fomc, fed-speakers, rate-decisions, cpi-ppi, jobs-report
  • travel: flight-search, hotel-comparison, airbnb, itinerary, restaurant-recs, transport-passes
  • email: inbox-triage, draft-replies, tone-matching, auto-rules, priority-senders
  • finance: expense-tracking, budget-categories, spending-alerts, monthly-report, savings-goal
  • personal-crm: contact-notes, meeting-history, follow-up-reminders, event-connections
  • calendar: task-management, reminders, appointment-booking, weekly-review, time-blocking
  • housing: apartment-search, lease-negotiation, neighborhood-comparison, move-planning
  • language: jlpt-n3, vocab-quiz, grammar-drills, mock-tests, progress-tracking
  • health: habit-tracking, exercise-log, water-intake, medical-appointments, meal-prep
  • tax: document-collection, cpa-communication, capital-gains-summary, filing-deadline
  • shopping: deal-alerts, price-co

The system addresses the core issue where agents can't distinguish between "I know this" and "I've never seen this" without loading everything or searching for specific terms.

📖 Read the full source: r/clawdbot

Ad

👀 See Also