Persistent memory for Home Assistant Assist, in plain markdown.
A lightweight memory layer for HA Assist, OpenAI, Anthropic Claude, or any conversation agent that supports tool use. No vector DB. No embeddings. Just markdown files you can read, edit, and version-control.
Inspired by Claude Code's MEMORY.md pattern.
Other HA memory integrations use vector embeddings, ChromaDB, or LangChain. They work — but they're heavy, opaque, and you can't debug them with cat.
This integration takes the opposite trade-off:
This (memory) |
Vector-based (Home Mind, hass-agent-llm, …) | |
|---|---|---|
| Index always in prompt | ✅ | ❌ (top-k retrieval) |
Inspect with cat / git diff |
✅ | ❌ |
| External dependencies | None | ChromaDB / FAISS / LangChain |
| Provider-agnostic | ✅ | Mostly |
| Scales to 10,000s of memories | ❌ | ✅ |
| Resource footprint | ~0 | Non-trivial |
If you have a few dozen memories and want them transparent and predictable, use this. If you have thousands and want semantic search, use a vector-based one.
- Services (exposed as tools to your LLM):
memory.save— save or overwrite a memorymemory.read— read the full body of a memorymemory.delete— delete a memory
- Sensor:
sensor.memory_index— itscontentattribute holds the fullMEMORY.mdindex, ready to inject into your conversation agent's system prompt template - A directory of markdown files you control completely
Once your conversation agent (Claude / OpenAI / Gemini / etc.) is set up in HA:
- Install Memory (instructions below) and restart HA.
- Settings → Devices & Services → Add Integration → "Memory", submit (default path is fine).
- Settings → Devices & Services → your conversation agent → Configure → tick the Memory checkbox in the API list (next to the existing "Assist" one) → submit.
- Talk to your assistant: "Remember that my dog's name is Bau."
- New conversation, days later: "What's my dog's name?" → it remembers.
That's it. No prompt templates, no script wrappers, no exposure step.
- HACS → Integrations → top-right ⋮ → Custom repositories
- Add
https://github.com/jayzuccarelli/ha-memoryas category Integration - Install Memory
- Restart Home Assistant
Copy custom_components/memory/ into your HA config/custom_components/, restart.
After install + restart: Settings → Devices & Services → Add Integration → search "Memory" → submit. The default storage path /config/memory is correct for most setups.
Memory registers itself as a native HA LLM API. In your conversation agent's config, you'll see Memory appear in the API list (alongside the built-in Assist). Tick it.
That's all the wiring. The agent now sees:
- The three tools —
memory_save,memory_read,memory_delete— as native LLM tools - The current memory index — auto-injected into the system prompt, no template editing needed
Tested with Anthropic Claude, OpenAI Conversation, Google Generative AI / Gemini, and AI Tasks — works identically with all of them.
Tip: if your agent's UI shows a single "Assist" checkbox and no API list, you may need to expand the section labeled something like "Recommended model settings" or "Advanced options" — providers vary slightly in how they surface the API picker.
If you want a non-LLM caller (an automation, AI Task service call, or bespoke script) to read or write memories, the integration also exposes plain HA services:
memory.save—name,type,description,contentmemory.read—name(returns content as response data)memory.delete—name
If you'd rather not select the Memory API and want to inject the index into your agent's instructions field by hand:
{{ state_attr('sensor.memory_index', 'content') or '(no memories yet)' }}
You'd then also need to instruct the LLM to use the services. The native API path is much cleaner — recommended unless you have a specific reason.
Each memory is one markdown file under your storage path:
---
name: pet_bau
description: User has a dog named Bau
type: user
---
The user has a dog named Bau. Bau is a household member.Plus an auto-maintained index (MEMORY.md) of one-liners pointing at each file.
| Type | What it's for |
|---|---|
user |
Facts about the user, household, family, pets |
feedback |
How the assistant should behave (style preferences, things to avoid) |
project |
State of ongoing things in the home |
reference |
Pointers to external systems / dashboards / docs |
vocabulary |
What specific words mean in this household ("all the lights" excludes the printer plug) |
MIT — see LICENSE.