frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Hmem – Persistent hierarchical memory for AI coding agents (MCP)

2•Bumblebiber•1h ago
My Claude told me to post this here :D

AI coding agents have two memory problems that CLAUDE.md and Rules files don't solve: (1) long conversations get compressed and context silently disappears — the agent forgets decisions made 2 hours ago in the same session, and (2) memory is locked to one tool on one machine. Switch from Claude Code to Cursor, or from your laptop to your desktop, and everything is gone.

I built hmem to fix both. It's an MCP server that gives AI agents persistent, hierarchical memory stored in a local SQLite file. The same .hmem file works across Claude Code, Cursor, Windsurf, OpenCode, and Gemini CLI — on any machine. Your agent's knowledge is portable.

The key idea is borrowed from how human memory works: you remember rough outlines first and recall details on demand. hmem has 5 depth levels. At session start, the agent loads only Level 1 summaries (~20 tokens). It drills deeper into specific memories only when needed — L2 for context, L3-L5 for raw details. Unlike a flat MEMORY.md that gets injected wholesale (3000-8000 tokens every time), hmem loads only what's relevant.

Install: `npx hmem-mcp init` (interactive setup — detects your installed tools and writes the MCP config).

This is beta software. I've been using it in production across two machines with 100+ memory entries and it's been stable, but the API surface may still change. Would appreciate feedback.

GitHub: https://github.com/Bumblebiber/hmem npm: https://www.npmjs.com/package/hmem-mcp License: MIT

Comments

Bumblebiber•1h ago
Author here, happy to answer questions.

Some background: I run a multi-agent AI system (orchestrator + specialized agents) across multiple machines. Two things kept biting me:

1. *Context dilution:* In long sessions, earlier context gets compressed or dropped. The agent "forgets" decisions made hours ago — not because the session ended, but because the context window silently pushed them out.

2. *Vendor/machine lock-in:* I switch between Claude Code, Gemini CLI, and OpenCode depending on the task. And I work on two PCs. CLAUDE.md only works in Claude Code, on one machine. There was no way to carry knowledge across tools or devices.

hmem solves both: it's a single .hmem file (SQLite) that any MCP-compatible tool can read/write. Same memory, any tool, any machine.

The lazy loading is key — the agent never reads the database directly. It makes tool calls and gets back only what it asked for. A typical session start costs ~20 tokens for the L1 overview. Drilling into one specific topic costs ~80 tokens. Compare that to a MEMORY.md that injects 3000-8000 tokens wholesale every time.

Technical details: - SQLite backend (better-sqlite3), one .hmem file per agent - 5-level hierarchy with dot-path addressing (e.g., L0003.2.1) - Entries are auto-timestamped, support time-range queries - Full-text search across all levels - Configurable category prefixes (defaults: P=Project, L=Lesson, E=Error, D=Decision, M=Milestone, S=Skill, F=Favorite) - Favorites are always loaded at depth 2 (pinned context) - Includes integrity checks — auto-backup on corruption detection

What's next: - Cloud sync between machines (encrypted, probably git-based) - Memory forks — think GitHub repos but for agent memories (fork a curated react-patterns.hmem as a starting point) - Better onboarding docs and a demo video

This is a genuine beta — I use it daily but it hasn't been battle-tested by others yet. If you try it, I'd love to hear what breaks or what's confusing about the setup.

beeman•45m ago
Hey there, thanks for sharing this! I wanted to check out the code but it seems like the repo is private.

EDuke32 – Open-Source Duke Nukem 3D

https://www.eduke32.com/
1•reconnecting•3m ago•0 comments

Show HN: See – searchable JSON compression (offline 10-min demo)

https://gitlab.com/kodomonocch1/see_proto
1•Tetsuro•7m ago•0 comments

5.25-inch floppy disks expected to help run San Francisco trains until 2030

https://arstechnica.com/gadgets/2024/04/5-25-inch-floppy-disks-expected-to-help-run-san-francisco...
1•adunk•7m ago•0 comments

Ace is a complete BASIC compiler for the Amiga computer platform

https://github.com/mdbergmann/ACEBasic
1•doener•7m ago•0 comments

Show HN: Visual Plan Mode for Pi Coding Agent

https://www.youtube.com/watch?v=XqFun9XCXPw
1•ramoz•8m ago•0 comments

Graphic Designer (Amiga) – Beta 5 Released

https://lifeschool22.itch.io/graphic-designer-amiga/devlog/1386833/graphic-designer-amiga-beta-5-...
1•doener•9m ago•0 comments

Building a Solar-Powered Bird Station

https://alec.is/posts/building-a-solar-powered-bird-station/
1•arm32•11m ago•0 comments

We've Been Fighting the Wrong Transportation Fight – Strong Towns

https://www.strongtowns.org/journal/2026-2-16-weve-been-fighting-the-wrong-transportation-fight
1•pkaeding•13m ago•0 comments

Coding like in the matrix learn scene

https://github.com/yotamarker/LivinGrimoire
1•mr_meeseeks•13m ago•0 comments

Show HN: Winslop – De-Slop Windows

https://github.com/builtbybel/Winslop
2•guilamu•17m ago•0 comments

Ask HN: How do you test your MyBatis dynamic SQL queries?

1•allegorist•21m ago•0 comments

Show HN: AI Agent for SEO

https://usefox.ai/
1•Creator-io•21m ago•0 comments

Toggle: A simple and keyboard friendly graphics drawing tool

https://github.com/Protyasha-Roy/toggle
2•zynovex•22m ago•0 comments

Tracing Chinese Immigration Through Food (2023)

https://sundaylongread.com/2023/11/17/chasing-chop-suey-tracing-chinese-immigration-through-food/
4•NaOH•31m ago•0 comments

Inputlag.science – Repository of knowledge about input lag in gaming

https://inputlag.science
9•akyuu•32m ago•0 comments

I quit my job to run EpsteinExposed.com full time

https://old.reddit.com/r/Epstein/comments/1ra6yw0/i_quit_my_job_to_run_epsteinexposedcom_full_time/
5•Betelbuddy•32m ago•1 comments

Parse, Don't Validate and Type-Driven Design in Rust

https://www.harudagondi.space/blog/parse-dont-validate-and-type-driven-design-in-rust/
7•todsacerdoti•33m ago•0 comments

Identity Theft 2.0

https://rekt.news/identity-theft-2
2•eustoria•37m ago•0 comments

New Technical Briefing: Digital Fingerprinting

https://blog.citp.princeton.edu/2026/02/20/new-technical-briefing-digital-fingerprinting/
2•eustoria•38m ago•0 comments

Ask HN: Do You Love My "Assess Idea" (AI) Robo-Reply Side Project Idea?

1•burnerToBetOut•39m ago•0 comments

Epstein files reveal how the rich fuel climate denialism

https://www.fastcompany.com/91490280/epstein-files-how-ultra-wealthy-peddle-climate-denialism
8•cdrnsf•40m ago•0 comments

Kubernetes Deployment Strategies for Zero Downtime

https://dixken.de/blog/kubernetes-deployment-strategies
1•mooreds•40m ago•0 comments

Measuring Claude Code ROI and Adoption in Honeycomb

https://www.honeycomb.io/blog/measuring-claude-code-roi-adoption-honeycomb
1•mooreds•41m ago•0 comments

Experimental pill dramatically reduces 'bad' cholesterol

https://medicalxpress.com/news/2026-02-experimental-pill-bad-cholesterol.html
1•PaulHoule•43m ago•1 comments

The Power of Constraints

https://collabfund.com/blog/the-power-of-constraints/
2•mooreds•44m ago•0 comments

BJJBench – tracking AI video model progress on Brazilian Jiu Jitsu techniques

https://bricee98.github.io/bjjbench/
1•bricee98•45m ago•1 comments

The Broken Record

https://2ndbreakfast.audreywatters.com/the-broken-record/
1•MindGods•46m ago•0 comments

JPMorgan Admits It Shut Trump's Accounts After Jan. 6 Capitol Attack

https://www.nytimes.com/2026/02/21/business/jpmorgan-trump-debanking.html
3•koolba•48m ago•1 comments

Bitcoin's Security Budget Transition: From Subsidy to Sustainability

https://cantonius.substack.com/p/bitcoin-asymmetry-rise-and-the-2040
1•antoniuschan99•51m ago•1 comments

Show HN: No Trace Chat – secret code, no signup, messages disappear after read

https://play.google.com/store/apps/details?id=com.teamzlab.no_trace_code_chat&hl=en_US
1•teamzlab•52m ago•0 comments