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

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
                                  │
                                  └──► (future) Vector index
                                  └──► (future) MCP server
  • 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.6.1.tar.gz (186.8 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.6.1-py3-none-any.whl (82.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for memloom-0.6.1.tar.gz
Algorithm Hash digest
SHA256 bebcc4fb6bcdce74894b1661fa0c6bc3d45c3aaf197c8438053b305016dd564a
MD5 dfd5e8c354229a4c3f210b35d56bd140
BLAKE2b-256 02b39517fea5252f1cb23dc351527ab50fb1d21677d3e28f399686fc814893ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for memloom-0.6.1.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.6.1-py3-none-any.whl.

File metadata

  • Download URL: memloom-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 82.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.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24656f93d3f4f83a4f2fb7cbd5de75dc56b67bfa72627589561d00617fec0c54
MD5 37b3fdee8d68ff2c8c256e0ff6bd41be
BLAKE2b-256 148412f9c9edc4a6652f808be520eb18095b22d8b78286af94f813732dd8ecac

See more details on using hashes here.

Provenance

The following attestation bundles were made for memloom-0.6.1-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