OpenCode · Claude Code · MIT

Memoryrefinementfor your agent.

A searchable journal, always-on state, semantic search across every past session, a background daemon, scheduled reminders, overnight self-maintenance — everything your agent needs to remember. Plain markdown and JSON on disk — nothing phones home, the whole system runs inside your existing agent permissions.

$"plugin": ["@geoql/mdr@latest"]
BIN · 0xA7 · TICK 08104 REFINING
8.37142.91475.60821.24539.00080.77167.48923.00584.22096.85132.13708.96451.50720.68045.33919.72683.41887.20561.89244.06712.55176.73490.32078.10835.00619.54944.42787.86221.11493.78062.63846.29500.44275.18198.71503.94629.27831.65087.02314.8667.08.15.04.02.19.07.11.06
→ refined · 12.4ms48 / 48
What it does

Six layers. One memory.

Every session starts with context injection — identity, projects, daily focus. Every session can write back. Nothing is lost between runs, nothing phones home, nothing needs an account.

01

Searchable journal

Every observation, decision, and learning the agent needs to remember gets appended to a date-partitioned JSONL journal — searchable, never truncated, never pruned.

append-onlyJSONL
02

Entity files

People, projects, and researched topics live as markdown under entities/. New agents discover them on first read; old agents extend them in place. A filing system that grows.

markdownpeople · projects · topics
03

Always-on state

identity.md, human.md, today.md, workspace.md. Small, byte-capped, injected every session. The agent knows who you are and what you are on before you type.

injected first
04

Semantic search

A Vectra vector index over the journal, entities, and past conversations. Embeddings run locally and offline with all-MiniLM-L6-v2; opt into an OpenAI-compatible endpoint if you want.

384-dim100% local
05

Background daemon

A cron runner supervises the agent. Hung children can no longer wedge the daemon (PR #34); a heartbeat lets a stale daemon self-heal on the next session.

heartbeat · restart
06

Scheduled reminders

Reminders, morning prep, distillation, and overnight dream-time reflection — through the same agent instance with the same permissions. Cron or one-shot.

cron · one-shot
How it fits

The plugin, the daemon, the disk.

OpenCode or Claude Code loads the plugin; the plugin reads from state/, journal/, entities/, and the .index/. The daemon supervises scheduled agent children with a heartbeat so a stale process can self-heal on the next session.

the host agent
OpenCode / Claude Code
plugin + MCP server
@geoql/mdr
always-injected
state/
append-only JSONL
journal/
people · projects · topics
entities/
cron runner · heartbeat
macrodata-daemon
Vectra · 384-dim
.index/
scheduled · cron · once
reminders/
→ plugin reads from index→ daemon reads from reminders→ heartbeat self-heals stale daemon

Storage layout

~/.config/macrodata/
├── identity.md
├── state/
│   ├── human.md
│   ├── today.md
│   ├── workspace.md
│   └── flags.md
├── entities/
│   ├── people/
│   ├── projects/
│   └── topics/
├── journal/      # date-partitioned JSONL
├── .index/        # Vectra · 384-dim
└── reminders/

Override paths

  • MACRODATA_ROOTmemory root dir
  • MACRODATA_CONFIG_PATHconfig.json path
  • MACRODATA_CHILD_TIMEOUT_MShard cap on scheduled agent runs

All state stays on your disk. Nothing phones home. Switch to a remote embedding endpoint any time — the local model is never loaded when one is configured.

Get it running

One line in opencode.json.

Restart your agent and ask it to set up Macrodata. The onboarding skill takes it from there — identity, human profile, first project, first journal entry — without touching the network.

OpenCode — opencode.json
{ "plugin": ["@geoql/mdr@latest"] }
Claude Code
$/plugin marketplace add geoql/mdr
$/plugin install refiner@mdr
Full installation guide
or install vianpm·JSR
Credit

A fork, with respect.

The layered-memory architecture, the tools, the skills, and the design are Matt Kane's work. @geoql/mdr stands entirely on that foundation — Node runtime, hardened daemon, full coverage, geoql release automation. The data directory, MCP server id, and tool names are unchanged from upstream, so an existing install keeps its memories.

M