@harigovindarajan/pi-memory-adapter
v0.1.0-beta.2
Published
Local-first memory subsystem for Pi
Maintainers
Readme
Pi Memory Adapter
A memory add-on for Pi that helps your assistant remember things across sessions.
It is designed for real daily use:
- easy to inspect by humans
- safe defaults
- works even when parts of retrieval fail
What you get
1) Human-readable memory files (default)
By default, memory is written to markdown files you can open and edit:
MEMORY.md→ long-term important facts/preferencesmemory/YYYY-MM-DD.md→ daily notes
2) Safe read behavior
Reading a memory file that does not exist returns empty text instead of crashing.
3) Better retrieval quality controls
Optional retrieval tuning:
- MMR (more diverse top results)
- Temporal decay (newer memories can rank above stale ones)
Install
# from npm
pi install npm:@harigovindarajan/pi-memory-adapter
# or from git
pi install git:github.com/harigovindarajan/pi-memory-adapterThen restart Pi (or run /reload).
Use in plain language
Save something
memory write "user prefers concise summaries"Search memory
memory search "how does user like summaries"Check health
memory doctorSee stats
memory statsWhere files are stored
Default base path:
~/.pi-agent/memory/Inside each namespace:
{agent_id}/{user_id}/{project_id}/
MEMORY.md
memory/YYYY-MM-DD.md
entries/*.json
index/*Notes:
- Markdown files are the canonical user-facing memory.
- JSON + index files are used for retrieval speed and compatibility.
Common checks
"Is markdown memory enabled?"
It is enabled by default.
You can still override with config at ~/.pi-agent/memory.config.json:
{
"markdown_memory": { "enabled": true }
}"Did it create files?"
After writing at least one memory, run:
find ~/.pi-agent/memory -type f \( -name "MEMORY.md" -o -path "*/memory/*.md" \)If you are using it as a library
import { MemoryAdapter } from "@harigovindarajan/pi-memory-adapter";
const memory = new MemoryAdapter({
agent_id: "my-agent",
project_id: "my-project",
});
await memory.write({ content: "user prefers dark mode", type: "curated" });
const result = await memory.search("user preferences");
console.log(result.entries);
const read = await memory.get("memory/2026-03-01.md", 1, 100);
console.log(read.text);Dev
npm install
npm run build
npm testLicense
MIT
Project Status
- Status: Active
- Last Updated: 2026-03-02
- Intent: Practical QA automation leadership and execution quality.
