Skip to main content

Weave your agents' memories into one searchable fabric — local-first, pluggable, raw-preserving.

Project description

memory-pipeline

Unified agent memory collection + local knowledge base.

Collects memory from multiple AI agents (OpenClaw, Claude Code, Codex, etc.) on local or SSH-reachable hosts, stores them as a raw-preserving data lake (JSON + markdown + SQLite FTS5), and exposes full-text search via a CLI.

Why

Every agent has its own memory. None of them talk to each other. This tool is the bottom layer of a stack that lets you grep/search/retrieve across all of them from one place.

The v0.1 design keeps everything raw — original files are copied (or referenced) to disk in their original form, with derived layers (facts, vector indices, graph relations) added on top later. You can always go back to the source.

v0.4 scope

  • Agents (collect): OpenClaw, Claude Code, Codex CLI, LibreChat, Generic JSONL
  • Agents (sync/push): OpenCode, Kilo Code, Qoder, Antigravity brain — push local stores to HTTP ingest
  • Hosts: local + SSH
  • Pipeline: collect → privacy-filter → tag → dedup → persist
  • Retrieval: CLI mp search over SQLite FTS5 + vector hybrid search
  • Ingest server: FastAPI POST /ingest with Bearer auth, privacy filter, auto-embed

Install

uv sync
# or: pip install -e .

Quick start

# 1. Drop a starter config
mp init-config ./config/memory-pipeline.yaml

# 2. Edit it: pick which agents, which hosts

# 3. Collect once
mp collect

# 4. Search
mp search "memory pipeline"
mp search --source openclaw "Beta preferences"

# 5. Inspect a record
mp inspect rec_abc123...

# 6. Status
mp status

# 7. (Push mode) Sync local agent stores to ingest server
mp sync run ~/.memloom-sync/config.yaml --once

# 8. Dashboard (optional) — overview / search / runs
#    see docs/dashboard.md
cd dashboard && npm install && npm run build
export MEMLOOM_INGEST_KEY=...
uv run memloom serve --config ./config/memloom.yaml --host 127.0.0.1
# → http://127.0.0.1:8789/

Layout

data/                          # data_root from config
  raw/<source>/<key>.json      # canonical record
  raw/<source>/<key>.md        # human-readable mirror
  index.sqlite                 # FTS5 over all records
  runs.sqlite                  # collector run history
  watermarks.json              # incremental cursors

Sync config (push mode)

# ~/.memloom-sync/config.yaml
endpoint: http://192.168.5.101:8789/ingest
api_key: memloom_ingest_xxxxx
batch_size: 500

sources:
  - type: opencode
    db: ~/.local/share/opencode/opencode.db
  - type: kilocode
    session_dir: ~/Library/Application Support/Code/User/globalStorage/kilocode.kilo-code/tasks

Cron

scripts/install-cron.sh registers mp collect every 5 minutes in the user's crontab. Idempotent — re-running picks up only what changed.

Architecture

Agents ──► Collectors ──► Pipeline ──► RawStore
                                  │
                                  ├──► sqlite-vec hybrid search
                                  ├──► HTTP ingest + MCP (/mcp)
                                  └──► Admin dashboard (/api/admin + SPA)
  • Collectors: one per agent type. They know the agent's on-disk format and yield MemoryRecords. They don't know about persistence.
  • Transport: pluggable. LocalTransport for local files, SSHTransport (Fabric) for remote. Collectors ask the transport to read/list — they don't care which one.
  • Pipeline: pure transforms on records — privacy filter, tag inference, deduper. Composable.
  • RawStore: append-only-ish writes keyed by content hash. Three artifacts per record (json + md + sqlite row). FTS5 index for retrieval.

Adding a new agent

  1. Subclass AgentAdapter in memloom/collectors/your_agent.py.
  2. Implement discover() (return list of Source) and pull() (yield (MemoryRecord, Watermark) pairs).
  3. Register in memloom/collectors/__init__.py:_REGISTRY.
  4. Add a config block under agents:.

That's it — pipeline + transport + store need zero changes.

Commit message format

We follow Conventional Commits (English, unless otherwise stated). Every commit message must match this format:

<type>(<scope>): <subject>     ←  ≤72 chars, imperative, no period

[optional body]                 ←  wrap at ~72 chars, explain WHAT and WHY

[optional footer]               ←  BREAKING CHANGE: or Refs: #123

Types: feat, fix, docs, style, refactor, test, chore, build, ci, perf, revert. Breaking changes use a ! after the type/scope (feat(api)!: drop v1 endpoint) or a BREAKING CHANGE: footer.

Scopes (project-specific): collectors, store, pipeline, transport, vector, mcp, cli, config, docs, deps, ci.

The repo ships with a .gitmessage template and a commit-msg git hook that enforces the format. To enable the hook after cloning:

./scripts/install-hooks.sh
git config commit.template .gitmessage

Examples:

feat(collectors): add OpenCode adapter
fix(privacy): strip ghp_ tokens from raw_meta
docs: add AnythingLLM integration guide
refactor(store)!: drop legacy v1 schema
chore(deps): bump pydantic to 2.13

Future (architecture already supports it)

  • v0.2: GitHub / Feishu / Notion / Email / browser extensions → drop in collectors under collectors/saas/.
  • v0.2: AnythingLLM integration via push to its Custom Embedding API.
  • v0.2: MCP server exposing search_records + get_record for OpenClaw.
  • v0.3: Graph layer (relationships between records, projects, agents).

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memloom-0.8.0.tar.gz (587.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memloom-0.8.0-py3-none-any.whl (454.5 kB view details)

Uploaded Python 3

File details

Details for the file memloom-0.8.0.tar.gz.

File metadata

  • Download URL: memloom-0.8.0.tar.gz
  • Upload date:
  • Size: 587.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memloom-0.8.0.tar.gz
Algorithm Hash digest
SHA256 fa6ab2fc4b8c06449636160af84a9659edcabd078a7a66ecf0fabe2475df836d
MD5 9f8fbc504c79b82becfd9cad92e635ab
BLAKE2b-256 50fad05239bacd9677aaf52866832e881a6ffa48f19440bedf6f8ee41d029ce9

See more details on using hashes here.

Provenance

The following attestation bundles were made for memloom-0.8.0.tar.gz:

Publisher: publish.yml on atbeta/memloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memloom-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: memloom-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 454.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for memloom-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d51b5d401cb4e47c267738b35e4be9754374f01698548d87c39e856d5aa96cc
MD5 168fa87bf1978a83d88e75430c933acc
BLAKE2b-256 2f25af779325ee29cc5643c9c1c768af79fa97c00f7f18ac988a25317f9e9f5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for memloom-0.8.0-py3-none-any.whl:

Publisher: publish.yml on atbeta/memloom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page