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

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.
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
👀 See Also

Automate GitHub PR review with Claude Code agents
A developer built an agent that processes GitHub mentions, spawns Claude Code workers to review or fix PRs, and only escalates ambiguous cases to humans.

Cloudflare's vinext: A Next.js-compatible framework built with AI on Vite
Cloudflare engineers rebuilt Next.js API surface on Vite using AI in one week, creating vinext - a drop-in replacement that builds 4x faster and produces 57% smaller bundles. It deploys to Cloudflare Workers with a single command.

Aired: A Claude Code Skill for Instant HTML Publishing to Live URLs
Aired is an open-source tool that publishes HTML to a live URL in 2 seconds via Claude Code skills or MCP servers. It requires no signup, deployment configuration, or installation for web-based AI tools, and works with Claude Code, Cursor, VS Code, Codex, and Windsurf.

sourcecode: Open-Source CLI to Compress Large Java/Spring Monorepos for Claude
sourcecode CLI reduces a ~4k-file Java/Spring monorepo from ~3M tokens to 1.7k tokens (compact mode). Currently focuses on context compression, git hotspot detection, and symbol lookup.