u/EasyManufacturer340

I built metaBrain, an open-source local memory store for AI agents

Hi r/OpenSourceAI,

I built metaBrain, an open-source local document memory for AI agents and developer workflows.

The project came from a problem I kept having while using agents for coding: useful context ends up scattered everywhere. Some of it is in markdown planning files, some in JSON state, some in scratch notes, some in task logs, and some in project-specific docs. Moving from one project to another gets tedious, and bootstrapping a new idea often means rebuilding the same context again.

metaBrain is my attempt to give that context one local, searchable place to live.

Documents are addressed with filesystem-like paths, for example:

/notes/today

/projects/foo/release-plan

/agents/openclaw/task-state

Under the hood they are stored in a local LevelDB-backed database with tags, metadata, lexical search, version history, zstd compression, JSONL export, and patch-based updates.

The CLI currently supports:

- put/get/list documents

- search by text, tags, and metadata

- patch documents with unified diffs

- inspect version history

- export the store as JSONL

- prune old versions

One goal was to make the tool discoverable by agents themselves. In my own workflow, I can point OpenClaw at the repo, ask it to discover the available commands, and then have it use `mb` directly as part of its task. That gives both me and the agent a shared local memory store instead of a pile of files spread across the workspace.

The repo is here:

https://github.com/OpenCow42/metaBrain

It is released under the permissive BSD 3-Clause license.

Install on macOS:

brew tap OpenCow42/tap && brew install mb

Example:

mb init

mb put /notes/today "Remember this project context." --tag planning --meta source=agent

mb search "project context"

mb get /notes/today

It is early. Right now it is a Swift package with a CLI and embeddable core library. I’m also planning a native Mac app to browse and inspect the database visually.

I’d be especially interested in feedback from open-source AI/tooling people:

- Is this useful as a local-first alternative to scattered agent memory files?

- Would an MCP server be the most useful next integration?

- What would make this easier or safer for agents to use autonomously?

reddit.com
u/EasyManufacturer340 — 3 days ago